vlanif接口通信本质

vlanif接口通信本质_第1张图片
SB部分:
interface Vlanif1

interface Vlanif10
ip address 20.1.1.2 255.255.255.0

interface Vlanif20
ip address 30.1.1.1 255.255.255.0

interface MEth0/0/1

interface GigabitEthernet0/0/1
port hybrid tagged vlan 10
port hybrid untagged vlan10

interface GigabitEthernet0/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20

SC部分配置:
interface Vlanif1

interface Vlanif10
ip address 30.1.1.2 255.255.255.0

interface Vlanif20
ip address 10.2.1.2 255.255.255.0

interface MEth0/0/1

interface GigabitEthernet0/0/1
port link-type access
port default vlan 20

interface GigabitEthernet0/0/2
port hybrid pvid vlan 10
port hybrid untagged vlan 10

实现SB和SC相连接口的通信。
ping 30.1.1.1
PING 30.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 30.1.1.1: bytes=56 Sequence=1 ttl=255 time=60 ms
Reply from 30.1.1.1: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 30.1.1.1: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 30.1.1.1: bytes=56 Sequence=4 ttl=255 time=50 ms
Reply from 30.1.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms

— 30.1.1.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/42/60 ms

你可能感兴趣的:(网络)