[RS] direct connection between two switches

Source: Internet
Author: User

[SW1] dis cur
#
Sysname SW1
#
Undo Info-center enable // disable the information center, that is, disable log synchronization.
#
VLAN batch 10 // set the native VLAN to vlan10
#

Interface vlanif1
#
Interface vlanif10
IP address 192.168.1.1 255.255.255.0
#
Interface meth0/0/1
#
Interface gigabitethernet0/0/1
Port Link-type access


[Sw2] dis cur
#
Sysname sw2
#
Undo Info-center enable
#
VLAN batch 10
#

Interface vlanif1
#
Interface vlanif10
IP address 192.168.1.2 255.255.255.0
#
Interface meth0/0/1
#
Interface gigabitethernet0/0/1
Port Link-type access

 

1. Can SW1 Ping 192.168.1.2? Can I ping 192.168.1.1?

2. What if the link between switches is replaced by trunk?

3. Why?

 

In fact, neither IP can be pinged. Only the trunk link can be pinged.

When sending data packets, the router and layer-3 switch must first view the routing-table.

When the link is access, we can view the route table

[SW1] dis IP ROU
Route flags: R-relay, D-download to fib
------------------------------------------------------------------------------
Routing tables: Public
Destinations: 2 routes: 2

Destination/mask proto pre cost flags nexthop Interface

127.0.0.0/8 Direct 0 0 d 127.0.0.1 inloopback0
127.0.0.1/32 direct 0 0 d 127.0.0.1 inloopback0

When the link is trunk, view the route table

[SW1] dis IP ROU
Route flags: R-relay, D-download to fib
------------------------------------------------------------------------------
Routing tables: Public
Destinations: 4 routes: 4

Destination/mask proto pre cost flags nexthop Interface

127.0.0.0/8 Direct 0 0 d 127.0.0.1 inloopback0
127.0.0.1/32 direct 0 0 d 127.0.0.1 inloopback0
192.168.1.0/24 direct 0 0 d 192.168.1.1 vlanif10
192.168.1.1/32 direct 0 0 d 127.0.0.1 vlanif10

Therefore, the switch can enable the layer-3 function only when the link is trunk, and then put the interface IP address and direct IP address into the routing table.

 

 

This article from "old books often read New Ideas" blog, please be sure to keep this source http://ramboking.blog.51cto.com/3596215/1543294

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.