一、拓?fù)?/h1>
基本互聯(lián)網(wǎng)通過(guò)OSPF實(shí)現(xiàn)全網(wǎng)的互聯(lián)互通
1、R1 OSPF配置
R1#sho run | s r ospf
router ospf 1
router-id 1.1.1.1
network 10.1.12.0 0.0.0.255 area 0
network 12.1.1.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 0
network 192.168.30.0 0.0.0.255 area 0
2、 R2 OSPF配置
R2#show running-config | section osp
router ospf 1
router-id 2.2.2.2
network 10.1.12.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 0
3、R3 OSPF配置
R3#show run | s ospf
router ospf 1
router-id 3.3.3.3
network 10.1.23.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area
二、 NAT關(guān)鍵配置
1、靜態(tài)NAT
R1(config)#ip nat inside source static 192.168.10.1 10.1.12.1
2、動(dòng)態(tài)NAT配置
R1(config)#ip nat pool office 10.1.12.3 10.1.12.5 netmask 255.255.255.0
配置ACL
進(jìn)行ping觸發(fā)NAT表項(xiàng)
PC1#ping 192.168.20.1
3、端口復(fù)用PAT技術(shù)
R1(config)#ip nat inside source list 10 interface ethernet 0/1 overload
查看NAT表項(xiàng)