Skip to content

Commit

Permalink
Update NATRouter.py
Browse files Browse the repository at this point in the history
Updated the documentation and correcteded a small error in the code
  • Loading branch information
DB-CL authored Mar 27, 2021
1 parent 9fca3f6 commit b0d9a8c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions samples/NATRouter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
$ python NATRouter.py addr1 port1 net1 addr2 port2 net2
addr1 - local address like 192.168.1.10/24
port1 - local port
net1 - local network number
addr2 - global address like 201.1.1.1:47809
port2 - local mapped port
net2 - global network number
port1 - local port like 47808
net1 - local network number like 1
addr2 - global address like 201.1.1.1
port2 - local mapped port like 47809
net2 - global network number like 2
The sample addresses are like running BR1 from Figure J-8, Clause J.7.5.
"""
Expand Down Expand Up @@ -67,7 +67,7 @@ def __init__(self, addr1, port1, net1, addr2, port2, net2):

# global address
global_addr = Address(addr2)
nat_addr = Address("{}:{}".format(addr1, port2))
nat_addr = Address("{}:{}".format(addr2, port2))

# create a NAT stack
self.s2_bip = BIPNAT(global_addr)
Expand Down

0 comments on commit b0d9a8c

Please sign in to comment.