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 ps://xwenw.com/tag/add" target="_blank">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
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。