网络技术-利用静态路由实现网络互通-3(1)

网络技术-利用静态路由实现网络互通-3(1)

 

已补

1,利用静态路由实现网络互通(两个公司互相通信)

完整图:

网络技术-利用静态路由实现网络互通-3(1)

2,配置路由器

网络技术-利用静态路由实现网络互通-3(1)

2.1,此时可以看到电脑和路由器之间是红色的,即不可通信,解决:

Router(config)#interface fa0/0
Router(config-if)#no shutdown 
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

网络技术-利用静态路由实现网络互通-3(1)

2.2,此时ping本机IP即可正常通信

网络技术-利用静态路由实现网络互通-3(1)

2.3,分别启用两台路由器的serial 0/0/0接口

Router(config)#interface serial 0/0/0 
Router(config-if)#no shutdown 
Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

网络技术-利用静态路由实现网络互通-3(1)

2.4,设置路由器的网关

路由器0

Router(config)#interface fa 0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0 # 设置此IP地址为本网段的网关

路由器1

Router(config)#interface fa0/0
Router(config-if)#ip address 10.1.1.1 255.255.255.0

此时,PC电脑即可与路由器通信

网络技术-利用静态路由实现网络互通-3(1)

网络技术-利用静态路由实现网络互通-3(1)

2.5,配置路由表(路由表是表达到达目的地的下一跳地址)

路线0:

Router(config)#ip route 10.1.1.0 255.255.255.0 2.2.2.2

路线1:

Router(config)#ip route 192.168.1.0 255.255.255.0 2.2.2.3

此时,即可相互通信

PC>ping 10.1.1.5

Pinging 10.1.1.5 with 32 bytes of data:
                                 
Reply from 10.1.1.5: bytes=32 time=11ms TTL=126
Reply from 10.1.1.5: bytes=32 time=8ms TTL=126
Reply from 10.1.1.5: bytes=32 time=3ms TTL=126
Reply from 10.1.1.5: bytes=32 time=7ms TTL=126

Ping statistics for 10.1.1.5:
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
  Minimum = 3ms, Maximum = 11ms, Average = 7ms

PC>ping 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:
                                    
Reply from 192.168.1.1: bytes=32 time=0ms TTL=255
Reply from 192.168.1.1: bytes=32 time=0ms TTL=255
Reply from 192.168.1.1: bytes=32 time=0ms TTL=255
Reply from 192.168.1.1: bytes=32 time=10ms TTL=255

Ping statistics for 192.168.1.1:
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
  Minimum = 0ms, Maximum = 10ms, Average = 2ms

PC>ping 2.2.2.2

Pinging 2.2.2.2 with 32 bytes of data:
                                
Reply from 2.2.2.2: bytes=32 time=1ms TTL=255
Reply from 2.2.2.2: bytes=32 time=0ms TTL=255
Reply from 2.2.2.2: bytes=32 time=0ms TTL=255
Reply from 2.2.2.2: bytes=32 time=0ms TTL=255

Ping statistics for 2.2.2.2:
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
  Minimum = 0ms, Maximum = 1ms, Average = 0ms

PC>ping 2.2.2.3

Pinging 2.2.2.3 with 32 bytes of data:
                                
Reply from 2.2.2.3: bytes=32 time=6ms TTL=254
Reply from 2.2.2.3: bytes=32 time=3ms TTL=254
Reply from 2.2.2.3: bytes=32 time=17ms TTL=254
Reply from 2.2.2.3: bytes=32 time=3ms TTL=254

Ping statistics for 2.2.2.3:
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
  Minimum = 3ms, Maximum = 17ms, Average = 7ms

PC>ping 10.1.1.0

Pinging 10.1.1.0 with 32 bytes of data:
                                 
Reply from 2.2.2.3: bytes=32 time=4ms TTL=254
Reply from 2.2.2.3: bytes=32 time=1ms TTL=254
Reply from 2.2.2.3: bytes=32 time=3ms TTL=254
Reply from 2.2.2.3: bytes=32 time=6ms TTL=254

Ping statistics for 10.1.1.0:
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
  Minimum = 1ms, Maximum = 6ms, Average = 3ms

PC>ping 10.1.1.1

Pinging 10.1.1.1 with 32 bytes of data:
                                 
Reply from 10.1.1.1: bytes=32 time=4ms TTL=254
Reply from 10.1.1.1: bytes=32 time=9ms TTL=254
Reply from 10.1.1.1: bytes=32 time=12ms TTL=254
Reply from 10.1.1.1: bytes=32 time=22ms TTL=254

Ping statistics for 10.1.1.1:
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
  Minimum = 4ms, Maximum = 22ms, Average = 11ms

PC>ping 10.1.1.5

Pinging 10.1.1.5 with 32 bytes of data:
                                 
Reply from 10.1.1.5: bytes=32 time=2ms TTL=126
Reply from 10.1.1.5: bytes=32 time=3ms TTL=126
Reply from 10.1.1.5: bytes=32 time=1ms TTL=126
Reply from 10.1.1.5: bytes=32 time=12ms TTL=126

Ping statistics for 10.1.1.5:
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
  Minimum = 1ms, Maximum = 12ms, Average = 4

网络技术-利用静态路由实现网络互通-3(1)

网络技术-利用静态路由实现网络互通-3(1)网络技术-利用静态路由实现网络互通-3(1)网络技术-利用静态路由实现网络互通-3(1)
好!!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值