Get the App
SLTechnology News&Howtos  ›  Servers  › 

The setting of one-arm routing

Shulou Source: shulou.com Published: 2022-06-02 21:57:36 10月03日 Update

Step 1: divide the vlan first

Command:

In config (global) mode: vlan + vlan id (pure number (number range 2-1000))

Sw#conf t

Sw (config) # vlan 10pm 20

Sw (config-vlan) # e

Step 2: divide the interface into the corresponding vlan

Command:

1. Enter the API first: int + the number of the API to be entered (click the green dot to see it)

2. Config-if (interface mode) sw+tab + ac + tab + vlan + the number of the vlan you want to plan (which vlan does this interface belong to)

Sw (config) # int f1and3

Sw (config-if) # sw

Sw (config-if) # switchport a

Sw (config-if) # switchport access vlan 10

Sw (config-if) # int f1and2

Sw (config-if) # sw

Sw (config-if) # switchport a

Sw (config-if) # switchport access vlan 20

Step 3: open the port.

Command:

1. Enter the API first: int + the number of the API to be entered (click the green dot to see it)

2. Config-if (interface mode) sw + tab + mo+ tab + t+tab

Sw (config) # int f1and1

Sw (config-if) # sw

Sw (config-if) # switchport mo

Sw (config-if) # switchport mode t

Sw (config-if) # switchport mode trunk

Step 4: repackage and configure ip

Command:

1. The interface mode entered in config (global mode): int + the interface number to be entered (click on the green dot to see it)

2. Open the physical interface no shut

3. Return to config mode and enter the logical subinterface int + interface .1 (one starts from 1 in sequence)

4. Enter the number of the vlan to be encapsulated with en + tab + d + tab + selected encapsulation

5. Configure gateway ip add + configured gateway + subnet mask

R1 (config) # int f0bin0

R1 (config-if) # no shut

R1 (config-if) # e

R1 (config) # int f0plus 0.1

R1 (config-subif) # en

R1 (config-subif) # encapsulation d

R1 (config-subif) # encapsulation dot1Q 10

R1 (config-subif) # ip add 192.168.10.1 255.255.255.0

R1 (config-subif) # e

R1 (config) # int f0plus 0.2

R1 (config-subif) # en

R1 (config-subif) # encapsulation d

R1 (config-subif) # encapsulation dot1Q 20

R1 (config-subif) #

Only when encapsulated through the router can you communicate across network segments.

Ping on-off

Tags: Interfaces modes commands encapsulation configuration global digital gateway routing only physical network segment range router logic sequence subnet planning input selection Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Technology MySQL Microsoft Shulou Information