Get the App
SLTechnology News&Howtos  ›  Servers  › 

Configure interface IP address and realize network-wide interworking through static route and default route configuration!

Shulou Source: shulou.com Published: 2022-06-02 08:07:48 10月01日 Update

Configure interface IP address and realize network-wide interworking through static route and default route configuration

1. Default route configuration for Router-R1/R3, and static route configuration for R2

two。 After configuring the IP address of the PC, the subnet mask, and the gateway, configure the IP address of the route R1UniGur3 /.

/ / user View

System-view / / enter the command line in user view to enter system view

[R1] interface GigabitEthernet 0Compact 0Compact 1 / / Interface View

[R1-GigabitEthernet0/0/1] ip address 192.168.1.254 255.255.255.0 / / configure the IP address for the 0ram 0can1 interface

[R1-GigabitEthernet0/0/1] interface GigabitEthernet0/0/ 0

/ / enter the interface view

[R1-GigabitEthernet0/0/0] ip address 192.168.2.1

255.255.255.0 / / configure the IP address for the 0Universe 1 interface

System-view

[R2] interface GigabitEthernet 0/0/1

[R2-GigabitEthernet0/0/0] IP address 192.168.2.2 255.255.255.0

[R2-GigabitEthernet0/0/0] interface GigabitEthernet0/0/ 1

[R2-GigabitEthernet0/0/1] ip address 192.168.3.2 255.255.255.0

System-view

[R3] interface GigabitEthernet 0/0/1

[R3-GigabitEthernet0/0/1] ip address 192.168.3.1 255.255.255.0

[R3-GigabitEthernet0/0/1] interface GigabitEthernet0/0/ 2

[R3-GigabitEthernet0/0/2] ip address 192.168.4.254 255.255.255.0

3. Static routing and default route settings begin after the router has been assigned an IP address

[R1-GigabitEthernet0/0/1] quit / / return to the previous view

Note: quit / / return to the previous view and return to the system view for configuration

[R1] ip route-static 0.0.0.0 0.0.0.0 192.168.3.2

/ / configure the default route in the system view

[R2-GigabitEthernet0/0/1] quit / / return to the previous view

[R2] ip route-static 192.168.1.0 255.255.255.0 192.168.2.1

[R2] ip route-static 192.168.4.0 255.255.255.0 192.168.3.1

/ / configure the default route in the system view

[R3-GigabitEthernet0/0/1] quit / / return to the previous view

Note: quit / / return to the previous view

[R3] ip route-static 0.0.0.0 0.0.0.0 192.168.3.2

/ / configure the default route in the system view

4. Use PC-1 ping PC-4 to enter in the command line interface

Use PC-1 ping PC-4

Use PC-4 ping PC-1 to enter in the command line interface

Ping 192.168.1.1

Tags: View configuration routing address Interface system previous static Command input user Interface Network-wide Gateway Router Subnet Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn MySQL Apple Linux macOS