首页 > 代码库 > G口与S口的区别

G口与S口的区别

拓扑图:


wKioL1RNzXWBk77cAAGj5fYYxTo792.jpg


RT1配置:

<RT1>sys

System View: return to User View with Ctrl+Z.

[RT1]int g0/0/0

[RT1-GigabitEthernet0/0/0]ip add 1.1.1.1 24

[RT1-GigabitEthernet0/0/0]ping 1.1.1.1


wKiom1RNzSHy8msyAAESrcl6M5k710.jpg


[RT1-GigabitEthernet0/0/0]int s0/1/0

[RT1-Serial0/1/0]ip add 2.2.2.2 24

[RT1-Serial0/1/0]ping 2.2.2.2


wKioL1RNzXWx0F3vAADclxTVbjo652.jpg

  RT2配置:

<RT2>sys

System View: return to User View with Ctrl+Z.

[RT2]

[RT2]int g0/0/0

[RT2-GigabitEthernet0/0/0]ip add 2.2.2.3 24

[RT2-GigabitEthernet0/0/0]int s0/1/0

[RT2-Serial0/1/0]ip add 1.1.1.2 24

[RT2-Serial0/1/0]

%Sep 28 21:58:41:859 2014 RT2 IFNET/5/PROTOCOL_UPDOWN: Protocol PPP IPCP on the interface Serial0/1/0 is UP.

[RT2-Serial0/1/0]

 

RT1RT2配环回地址:

[RT1-Serial0/1/0]quit

[RT1]int loo1

[RT1-LoopBack1]ip add 3.3.3.3 32

 

[RT2-Serial0/1/0]quit

[RT2]int loo1

[RT2-LoopBack1]ip add 4.4.4.4 32

[RT2-LoopBack1]

 

关闭RT1RT2S口:

[RT1-LoopBack1]int s0/1/0

[RT1-Serial0/1/0]shut


wKioL1RNzXjRxf_iAAEdImL-1Wk006.jpg


wKiom1RNzSOy3lmOAAEixnQwM-M688.jpg


RT1RT2G口配静态路由:

[RT1-Serial0/1/0]quit

[RT1]ip route-static 4.4.4.4 32 2.2.2.3

[RT1]

 

 

[RT2-LoopBack1]quit

[RT2]ip route-static 3.3.3.3 32 1.1.1.1

[RT2]

wKioL1RNzXiSzqKjAADhFqP6Cxw777.jpg


关闭RT1RT2G口,开S口:

[RT1]undo ip route-static 4.4.4.4 32

[RT1]int s0/1/0

[RT1-Serial0/1/0]undo shut


wKiom1RNzSTwsjpdAAFMVlJkqkw517.jpg

[RT1-Serial0/1/0]int g0/0/0

[RT1-GigabitEthernet0/0/0]shut


wKioL1RNzXiBn-fIAADaj0HgJLw611.jpg


[RT2]undo ip route-static 3.3.3.3 32


wKiom1RNzSSj2du0AAERnK2QOAs751.jpg

wKioL1RNzXmRJhPUAAC_Ow9CwMs910.jpg

 

RT1RT2S口配静态路由:

 

[RT1-GigabitEthernet0/0/0]quit 

[RT1]ip route-static 4.4.4.4 32 1.1.1.2

 

 

[RT2]ip route-static 3.3.3.3 32 2.2.2.2

 


wKiom1RNzSWj50mlAAFmrdFsOes484.jpg


总结:

 

S口支持的链路协议为PPPPPP是一种点到点协议,它支持地址协商功能,所以不存在同一网段,ip地址不同还是可以ping通的。

 

 

 





G口与S口的区别