Experiment on single-arm routing using a layer-3 Switch

Source: Internet
Author: User

Experiment on single-arm routing using a layer-3 Switch

In the real environment, sometimes the gateway is not necessarily enabled on the router, sometimes the single-arm routing function is not necessarily connected to the interface on the router, you can use a layer-3 switch, because the vswitch itself has a variety of interfaces for flexible use, it is very common in practical work. Readers can compare the previous article "using single-arm routing Experiment Sub-interfaces" to find out the secrets.

The specific operations are as follows:

Background description: Two VLANs (vlan 501/406) are required on the switch1-2950T-24. vlan 501 uses the first 10 ports, vlan406 uses port 0/11-0/20, and vlan 501 uses the 10.63..0 .0/24 network segment; vlan 406 uses the 10.63.206.0/25 network segment, the gateway uses the last available address, and the management address vlan 1 uses 10.63.207.128/25.

1. Network Topology

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/16043LK3-0.png "style =" float: none; "title =" 2013-11-23_151432.png "alt =" 214857105.png"/>

2. Operation on core switch C3560-24PS)

Switch> en

Switch # conf

Switch # configure

Starting ing from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.


1) No device named here. Enable the telnet user password.

Switch (config) # line vty

Switch (config) # line vty 0 4

Switch (config-line) # login

% Login disabled on line 66, until 'Password' is set

% Login disabled on line 67, until 'Password' is set

% Login disabled on line 68, until 'Password' is set

% Login disabled on line 69, until 'Password' is set

% Login disabled on line 70, until 'Password' is set

Switch (config-line) # pas

Switch (config-line) # password 123123

Switch (config-line) # exi


2) create a vlan

Switch (config) # vlan 501

Switch (config-vlan) # ex

Switch (config) # vlan 406

Switch (config-vlan) # ex


3) Specify the interface gateway address

Switch (config) # inter

Switch (config) # interface vla

Switch (config) # interface vlan 501

% LINK-5-CHANGED: Interface Vlan501, changed state to up

Switch (config-if) # ip ad

Switch (config-if) # ip address 10.63.201.254 255.255.255.0

Switch (config-if) # exi

Switch (config) # inter

Switch (config) # interface vlan 406

% LINK-5-CHANGED: Interface Vlan406, changed state to up

Switch (config-if) # ip address 10.63.206.126 255.255.255.128

Switch (config-if) # ex


4) Add the address pool of the corresponding vlan

Switch (config) # ip dhcp pool vlan501

Switch (dhcp-config) # net

Switch (dhcp-config) # network 10.63.201.0 255.255.255.0

Switch (dhcp-config) # default-router 10.63.201.254

Switch (dhcp-config) # dns-server 10.10.2.1

Switch (dhcp-config) # ex

Switch (config) # ip dhcp po

Switch (config) # ip dhcp pool vlan406

Switch (dhcp-config) # network 10.63.206.0 255.255.255.255.128

Switch (dhcp-config) # default-router 10.63.206.126

Switch (dhcp-config) # dns-server 10.10.2.1

Switch (dhcp-config) # ex

Switch (config )#


5) Enable trunk Mode

Switch (config) # interface f

Switch (config) # interface fastEthernet 0/1

Switch (config-if) # sw

Switch (config-if) # switchport mode trunk

Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.

Switch (config-if) # exi

Switch (config) # ex

% SYS-5-CONFIG_ I: Configured from console by the console

Switch # write // save it


3. operations on the aggregation Switch

Switch>

Switch> en

Switch # conf

Starting ing from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.

Switch (config )#


1) Add a telnet User Password

Switch (config) # line vty

Switch (config) # line vty 0 4

Switch (config-line) # login

% Login disabled on line 66, until 'Password' is set

% Login disabled on line 67, until 'Password' is set

% Login disabled on line 68, until 'Password' is set

% Login disabled on line 69, until 'Password' is set

% Login disabled on line 70, until 'Password' is set

Switch (config-line) # pas

Switch (config-line) # password 123123

Switch (config-line) # exi


2) Add a vlan

Switch (config) # vlan 501

Switch (config-vlan) # ex

Switch (config) # vlan 406

Switch (config-vlan) # ex


3) the corresponding interface enables the trunk Mode

Switch (config) # inter

Switch (config) # interface gigabitEthernet 1/1

Switch (config-if) # no shutdown

Switch (config-if) # sw

Switch (config-if) # switchport m

Switch (config-if) # switchport mode trunk


% LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to down


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


Switch (config-if) # ex

Switch (config) # inter

Switch (config) # interface f

Switch (config) # interface fastEthernet 0/1

Switch (config-if) # sw

Switch (config-if) # sw

Itchport mode t

Switch (config-if) # switchport mode trunk

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


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


Switch (config-if) # no shutdown

Switch (config-if) # ex

Switch (config )#


4) Add a management address

Switch (config) # inter

Switch (config) # interface vlan 1

Switch (config-if) # no shutdown


% LINK-5-CHANGED: Interface Vlan1, changed state to up


% LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up


Switch (config-if) # ip address 10.63.207.129 255.255.255.128

Switch (config-if) # ex

Switch (config) # ip default-gateway 10.63.207.254

Switch (config) # ex


% SYS-5-CONFIG_ I: Configured from console by the console

Switch #


4. operations on the Access Switch

Switch> en

Switch # conf

Starting ing from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.


1) Add a telnet User Password

Switch (config) # line vty

Switch (config) # line vty 0 4

Switch (config-line) # login

% Login disabled on line 66, until 'Password' is set

% Login disabled on line 67, until 'Password' is set

% Login disabled on line 68, until 'Password' is set

% Login disabled on line 69, until 'Password' is set

% Login disabled on line 70, until 'Password' is set

Switch (config-line) # pas

Switch (config-line) # password 123123

Switch (config-line) # exi


2) Add a vlan

Switch (config) # vlan 501

Switch (config-vlan) # ex

Switch (config) # vla

Switch (config) # vlan 406

Switch (config-vlan) # ex


3) Enable trunk Mode

Switch (config) # inter

Switch (config) # interface g

Switch (config) # interface gigabitEthernet 1/1

Switch (config-if) # no shutdown

Switch (config-if) # sw

Switch (config-if) # switchport mode trunk

Switch (config-if) # ex


4) route the corresponding interface to the corresponding vlan

Switch (config) # inter

Switch (config) # interface range f

Switch (config) # interface range fastEthernet 0/1-10

Switch (config-if-range) # no shutdown

Switch (config-if-range) # sw

Switch (config-if-range) # switchport access vlan 501

Switch (config-if-range) # ex

Switch (config) # inter

Switch (config) # interface r

Switch (config) # interface range f

Switch (config) # interface range fastEthernet 0/11-20

Switch (config-if-range) # no shutdown

Switch (config-if-range) # switchport ac

Switch (config-if-range) # switchport access vlan 406

Switch (config-if-range) # ex


5) add management addresses for management VLANs

Switch (config) # inter

Switch (config) # interface vlan 1

Switch (config-if) # ip ad

Switch (config-if) # ip address 10.63.207.130 255.255.255.128

Switch (config-if) # exi

Switch (config) # ip default-gateway 10.63.207.254

Switch (config) # ex

Switch # write // save it

Switch #

5. Check whether the IP address can be automatically obtained.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/16043I107-1.png "style =" float: none; "title =" 2013-11-23_154538.png "alt =" 214906677.png"/>

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/16043M047-2.png "style =" float: none; "title =" 2013-11-23_151_9.png "alt =" 222239186.png"/>

6. ping and try again.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/16043K5D-3.png "title =" 2013-11-23_222831.png "alt =" 222852290.png"/>

7. This test has been completed. If you have any questions, please leave a message. The previous article is about the router interface to achieve single arm routing experiment, http://liufei888.blog.51cto.com/2625545/1329946



This article is from the blog "Liu Fei's blog space". For more information, contact the author!

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.