核心路由器与出口路由器怎么进行三层私网互联?核心路由器端口GE1/1/1,ip192.168.10.10,出口路由器端口GE1/1/2,ip 192.168.10.9, 麻烦帮助写下配置脚本?谢谢了
(0)
最佳答案
静态路由
交换机各接口及主机的IP地址和掩码如图1-2所示。要求采用静态路由,使图中任意两台主机之间都能互通。
(1) 配置各接口的IP地址(略)
(2) 配置静态路由
# 在Switch A上配置缺省路由。
<SwitchA> system-view
[SwitchA] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2
# 在Switch B上配置两条静态路由。
<SwitchB> system-view
[SwitchB] ip route-static 1.1.2.0 255.255.255.0 1.1.4.1
[SwitchB] ip route-static 1.1.3.0 255.255.255.0 1.1.5.6
# 在Switch C上配置缺省路由。
<SwitchC> system-view
[SwitchC] ip route-static 0.0.0.0 0.0.0.0 1.1.5.5
(3) 配置主机
配置Host A的缺省网关为1.1.2.3,Host B的缺省网关为1.1.6.1,Host C的缺省网关为1.1.3.1,具体配置过程略。
# 查看Switch A的静态路由信息。
[SwitchA] display ip routing-table protocol static
Summary count : 1
Static Routing table status : <Active>
Summary count : 1
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 60 0 1.1.4.2 Vlan500
Static Routing table status : <Inactive>
Summary count : 0
# 查看Switch B的静态路由信息。
[SwitchB] display ip routing-table protocol static
Summary count : 2
Static Routing table status : <Active>
Summary count : 2
Destination/Mask Proto Pre Cost NextHop Interface
1.1.2.0/24 Static 60 0 1.1.4.1 Vlan500
1.1.3.0/24 Static 60 0 1.1.5.6 Vlan600
Static Routing table status : <Inactive>
Summary count : 0
# 在Host B上使用ping命令验证Host A是否可达(假定主机安装的操作系统为Windows XP)。
C:\Documents and Settings\Administrator>ping 1.1.2.2
Pinging 1.1.2.2 with 32 bytes of data:
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Ping statistics for 1.1.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
# 在Host B上使用tracert命令验证Host A是否可达。
C:\Documents and Settings\Administrator>tracert 1.1.2.2
Tracing route to 1.1.2.2 over a maximum of 30 hops
1 <1 ms <1 ms <1 ms 1.1.6.1
2 <1 ms <1 ms <1 ms 1.1.4.1
3 1 ms <1 ms <1 ms 1.1.2.2
Trace complete.
(0)
核心路由器
int g1/1/1
ip add 192.16810.10 255.255.255.252
ip route 0.0.0.0 0 192.168.10.9
出口路由器
int g1/1/2
ip add 192.168.10.9 255.255.255.252
ip route xxxx xxx 192.168.10.10
xxx为去往核心路由器上面的明细路由
(0)
暂无评论
您好,请知:
以下是核心路由器的配置参考脚本:
int gi 1/1/2
ip address 192.168.10.10 30
quit
ip route-static 0.0.0.0 0.0.0.0 192.168.10.9
以下是静态路由的配置举例,请参考:
静态路由
交换机各接口及主机的IP地址和掩码如图1-2所示。要求采用静态路由,使图中任意两台主机之间都能互通。
(1) 配置各接口的IP地址(略)
(2) 配置静态路由
# 在Switch A上配置缺省路由。
<SwitchA> system-view
[SwitchA] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2
# 在Switch B上配置两条静态路由。
<SwitchB> system-view
[SwitchB] ip route-static 1.1.2.0 255.255.255.0 1.1.4.1
[SwitchB] ip route-static 1.1.3.0 255.255.255.0 1.1.5.6
# 在Switch C上配置缺省路由。
<SwitchC> system-view
[SwitchC] ip route-static 0.0.0.0 0.0.0.0 1.1.5.5
(3) 配置主机
配置Host A的缺省网关为1.1.2.3,Host B的缺省网关为1.1.6.1,Host C的缺省网关为1.1.3.1,具体配置过程略。
# 查看Switch A的静态路由信息。
[SwitchA] display ip routing-table protocol static
Summary count : 1
Static Routing table status : <Active>
Summary count : 1
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 60 0 1.1.4.2 Vlan500
Static Routing table status : <Inactive>
Summary count : 0
# 查看Switch B的静态路由信息。
[SwitchB] display ip routing-table protocol static
Summary count : 2
Static Routing table status : <Active>
Summary count : 2
Destination/Mask Proto Pre Cost NextHop Interface
1.1.2.0/24 Static 60 0 1.1.4.1 Vlan500
1.1.3.0/24 Static 60 0 1.1.5.6 Vlan600
Static Routing table status : <Inactive>
Summary count : 0
# 在Host B上使用ping命令验证Host A是否可达(假定主机安装的操作系统为Windows XP)。
C:\Documents and Settings\Administrator>ping 1.1.2.2
Pinging 1.1.2.2 with 32 bytes of data:
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Ping statistics for 1.1.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
# 在Host B上使用tracert命令验证Host A是否可达。
C:\Documents and Settings\Administrator>tracert 1.1.2.2
Tracing route to 1.1.2.2 over a maximum of 30 hops
1 <1 ms <1 ms <1 ms 1.1.6.1
2 <1 ms <1 ms <1 ms 1.1.4.1
3 1 ms <1 ms <1 ms 1.1.2.2
Trace complete.
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论