Skip to main content

nat config

c

NAT generiek (voor alle varianten)

R1(config)# interface gigabitEthernet 0/0

R1(config-if)# ip nat outside

R1(config-if)# exit

R1(config)# interface gigabitEthernet 1/0

R1(config-if)# ip nat inside

R1(config-if)# exit

WAN interface (publiek IP)

 

 

LAN interface (privaat IP)

R1# show ip nat translations

Laat de NAT tabel zien met koppeling privaat/publiek IP/poort.

Static NAT

R1(config)# ip nat inside source static <privaat ip> <publiek ip>

R1(config)# ip nat inside source static 192.168.1.10 2.2.2.2

R1(config)# ip nat inside source static 192.168.1.11 2.2.2.3

Elke host moet een eigen publiek IP adres toegewezen krijgen.

Dynamic NAT

R1(config)# ip nat pool NAAMVANDEPOOL 2.2.2.20 2.2.2.23 netmask 255.255.255.0

R1(config)# access-list 1 permit 192.168.1.0 0.0.0.255

R1(config)# ip nat inside source list 1 pool NAAMVANDEPOOL

Elke host krijgt een IP adres toegewezen uit de pool van publieke IP’s. Als er geen adressen meer beschikbaar zijn kan de host niet op het internet.

PAT (NAT overload/Port translation)

R1(config)# access-list 1 permit 192.168.1.0 0.0.0.255

R1(config)# ip nat inside source list 1 interface gig 0/0 overload

Elke host gebruikt het publieke IP adres van interface gigabitEthernet 0/0.