Cisco Configuration vlan+ Relay Agent +nat forwarding Internet

Source: Internet
Author: User

Lab Environment:

Routers make Tp-link set up NAT forwarding, Tp-link router gateway is set to 192.168.30.254

( core layer) Cisco 35,503 layer switch (model C3550-I5Q3L2-M) configuration three Vlan,vlan 10, VLAN 20, and VLAN 30

IP address for VLAN 10:192.168.10.1/24

IP address for VLAN 20:192.168.20.1/24

FA0/24 ports are configured as trunk port-level converged layer Cisco 2960 switch FA0/24 ports through VLAN 10 and VLAN 20

IP address for VLAN 30:192.168.30.1/24 is mainly used for connecting with Tp_link routers, setting up static route forwarding use, using FA0/23 port

( aggregation layer) Cisco 29,602-Layer Switching (model WS-C2960S-24TS-L) machine configuration two Vlan,vlan 10 and VLAN 20

callout:ga 1/0/1-5 Meaning: 1 for the first slot, 0 for the 0 slot on the card, and 1-5 for the port on the slot.

VLAN 10 divides the GI 1/0/1-5 port

VLAN 20 divides the GI 1/0/6-10 port

Gi 1/0/24 port configured as Trunk Port Cascade core layer Cisco 3550 Switch FA0/24 port through transmission VLAN 10 and VLAN 20

Gi 1/0/1 port Access DHCP server

( access layer) Tp-link SG 1024T Switch

Implementation features:

1, VLAN 10 and VLAN 20 can access each other.

2, the computer can automatically get the DHCP server to assign different VLAN IP address.

3, the computer can sisu net

##### #Cisco 3550 three-layer switch operation step ######

1. Create VLAN 10 and VLAN 20

#特权模式下进入VLAN子模式

switch#VLAN Database

#创建VLAN 10 named VLAN10

Switch (VLAN) #VLAN ten name VLAN10

#创建VLAN 20 named VLAN20

Switch (VLAN) #VLAN # name VLAN20

2. VLAN assignment IP address and gateway

#全局模式下进入VLAN 10

Switch (config) #interface VLAN

#VLAN 10 assigning IP addresses and gateways, 192.168.10.1 is the gateway for VLAN 10

Switch (config-if) #IP address 192.168.10.1 255.255.255.0

#退出

Switch (config-if) #Exit

#全局模式下进入VLAN 20

Switch (config) #interface VLAN

#VLAN 20 assigning IP addresses and gateways, 192.168.10.1 is the gateway for VLAN 20

Switch (config-if) #IP address 192.168.20.1 255.255.255.0

#退出

Switch (config-if) #Exit

#特权模式下查看当前配置信息

switch#Show Running-config

3. Turn on the three layer switch routing function

#全局模式下开启路由后VLAN can access each other.

Switch (config) #IP Routing

#特权模式下查看路由表

switch#show ip route

#特权模式下保存配置

switch#Write

4. VLAN Configuration DHCP Relay Agent

#全局模式下进入VLAN 10

Switch (config) #interface VLAN

#配置VLAN 10 Relay Agent, 192.168.10.200 is the DHCP server address

Switch (config-if) #IP helper-address 192.168.10.200

#退出VLAN 10

Switch (config-if) #Exit

#全局模式下进入VLAN 20

Switch (config) #interface VLAN

#配置VLAN 20 Relay Agent, 192.168.10.200 is the DHCP server address

Switch (config-if) #IP helper-address 192.168.10.200

#退出VLAN 20

Switch (config-if) #Exit

5. Set FA0/24 port to trunk port

switch#Show Interfaces fastethernet 0/24 Switchport

Name:fa0/24

Switchport:enabled

Administrative mode: dynamic desirable #三层交换机端口默认dynamic desirable do not have to set the trunk port, this mode will automatically adapt to the peer port operation mode

Operational Mode: trunk

6. Set up the static route forwarding router to realize the Internet

#特权模式下进入VLAN子模式

switch#VLAN Database

#VLAN 30 named Route30

Switch (VLAN) #VLAN-name Route30

#退出

Switch (VLAN) #Exit

#全局模式下进入VLAN 30

Switch (config) #interface VLAN

#VLAN 30 Configuring the IP address and gateway, 192.168.30.1 is the gateway for VLAN 30

Switch (config-if) #IP address 192.168.30.1 255.255.255.0

#退出

Switch (config-if) #Exit

#全局模式下进入fa0/23 Ports

Switch (config) #interface fastethernet 0/23

#fa0/23 Ports assigned to VLAN 30

Switch (config-if) #switchport access VLAN

#激活端口

Switch (config-if) #no shutdown

#全局模式下设置静态路由转发, 192.168.30.254 is the Tp-link router gateway

Switch (config) #IP route 0.0.0.0 0.0.0.0 192.168.30.254

#特权模式下查看路由表

switch#show ip route

#特权模式下保存配置

switch#Write

7. Tp-link Router set loopback static route

##### #Cisco 2960 Two-layer switch operation step ######

1. Create VLAN 10 and VLAN 20

#全局模式下创建vlan 10

Switch (config) #VLAN Ten

#VLAN 10 named VLAN10

Switch (Config-vlan) #name VLAN10

#退出VLAN 10

Switch (Config-vlan) #Exit

#全局模式下创建vlan 20

Switch (config) #VLAN

#VLAN 20 named VLAN20

Switch (Config-vlan) #name VLAN20

#退出VLAN 10

Switch (Config-vlan) #Exit

#特权模式下查看创建的VLAN

switch#Show VLAN

2. VLAN assignment port (VLAN 10 divides GI 1/0/1-5 port, vlan 20 divides GI 1/0/6-10 port)

#全局模式下进入ga 1/0/1-5 Port

Switch (config) #interface range gigabitethernet 1/0/1-5

#设置端口工作模式为access

Switch (config-if-range) #switchport mode access

#端口分配到VLAN 10

Switch (config-if-range) #switchport access VLAN

#激活端口

Switch (config-if-range) #no shutdown

#退出

Switch (config-if-range) #Exit

#全局模式下进入ga 1/0/5-6 Port

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

#设置端口工作模式为access

Switch (config-if-range) #switchport mode access

#端口分配到VLAN 20

Switch (config-if-range) #switchport access VLAN

#激活端口

Switch (config-if-range) #no shutdown

#退出

Switch (config-if-range) #Exit

#特权模式下查看VLAN Port allocation

switch#Show VLAN

3. Set GA1/0/24 port to trunk port

#全局模式下进入Gi 1/0/24 Port

Switch (config) #interface gigabitethernet 1/0/24

#设置Gi 1/0/24 Port is trunk port

Switch (config-if) #switchport mode trunk

#激活端口

Switch (config-if) #no shutdown

#退出

Switch (config-if) #Exit

#特权模式下查看 Gi 1/0/24 Port operating mode

switch#Show Interfaces gigabitethernet 1/0/24 Switchport

Administrative Mode: trunk

#特权模式下保存配置

switch#Write

Cisco Configuration vlan+ Relay Agent +nat forwarding Internet

Related Article

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.