HCIP-6.5 OSPF NAT配置

数通

SW1:

dis ip int brief # 查看直连网段
ospf 1
 area 0
  network 192.168.2.0 0.0.0.255
  net 192.168.3.0 0.0.0.255
  net 192.168.4.0 0.0.0.255
  net 192.168.5.0 0.0.0.255
  net 192.168.200.0 0.0.0.255

SW2:

dis ip int b
 ospf 1
  area 0
    network 192.168.2.0 0.0.0.255
    net 192.168.3.0 0.0.0.255
    net 192.168.4.0 0.0.0.255
    net 192.168.5.0 0.0.0.255
    net 192.168.200.0 0.0.0.255

电信R2:

int g0/0/0
 ip address 12.1.1.2 24

联通R3:

int e0/0/0
 ip add 13.1.1.2 24

分支R4:

int e0/0/0
 ip add 14.1.1.2 24
int e0/0/1
 ip add 192.168.100.1 24

R1:

ospf 1
 area 0
  net 192.168.12.0 0.0.0.255
  net 192.168.23.0 0.0.0.255
  net 14.1.1.0 0.0.0.255

分支R4:

ospf 1
 area 0
  net 192.168.200.0 0.0.0.255
  net 14.1.1.0 0.0.0.255

调试查看路由表:

分支R4:

dis ip routing-table

DHCP Server:

int e0/0/0
 ip add 192.168.200.3 24
ip route-s 0.0.0.0 0 192.168.200.1   # 配置网关

运营商网络,用RIP模拟:

电信R2:

int g0/0/1
 ip add 25.1.1.2 24
#
rip 1
 ver 2
 net 12.0.0.0
 net 25.0.0.0

联通R3:

int g0/0/1
 ip add 35.1.1.3 24
#
rip 1
 version 2
 net 13.0.0.0
 net 35.0.0.0

R5:

int e0/0/0
 ip add 25.1.1.5 24
int e0/0/1
 ip add 35.1.1.5 24
int g0/0/0
 ip add 5.5.5.1 24
 #
rip 1
 ver 2
 net 25.0.0.0
 net 35.0.0.0
 net 5.0.0.0

调试命令:

dis ip routing-t

缺省路由配置:

SW1:

ip route-s 0.0.0.0 0 192.168.12.1
ip route-s 0.0.0.0 0 192.168.23.1 perference 65

SW2:

ip route-s 0.0.0.0 0 192.168.23.1
ip route-s 0.0.0.0 0 192.168.12.1 perference 65

R1:

ip route-s 0.0.0.0 0 13.1.1.2

NAT转换:

R1(联通):

acl 2000
 rule permit source 192.168.0.0 0.0.255.255
 #
 int g1/0/0
  nat outbound 2000

来回路径一致,且最短

SW1:

int vlanif 4
 ospf cost 4
int vlanif 5
 ospf cost 4

SW2:

int vlanif 2
 ospf cost 4
int vlanif 3
 opsf cost 4
 #  
int vlanif 200  # 接服务器的
 opsf cost 4
版权声明:本文为下一朵云发布文章,转载请附上原文出处链接和本声明。
本文链接:https://www.orcy.net.cn/3870.html

暂无评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注