Table of Contents 1 Static Routing Configuration 1-1

Similar documents
Table of Contents 1 Static Routing Configuration 1-1

Table of Contents 1 Static Routing Configuration 1-1

HP 5120 EI Switch Series

IP Routing Volume Organization

Contents. Configuring a default route 1 Introduction to default routes 1

Configuring static routing

HP FlexFabric 5700 Switch Series

Operation Manual IPv4 Routing H3C S3610&S5510 Series Ethernet Switches. Table of Contents

Table of Contents 1 Static Routing Configuration RIP Configuration 2-1

HP A5820X & A5800 Switch Series Layer 3 - IP Routing. Configuration Guide. Abstract

HP A5830 Switch Series Layer 3 - IP Routing. Configuration Guide. Abstract

HP 5920 & 5900 Switch Series

HP 5920 & 5900 Switch Series

H3C S5130-EI Switch Series

H3C BGP Configuration Examples

HPE FlexNetwork 5510 HI Switch Series

Table of Contents 1 IP Addressing Configuration IP Performance Configuration 2-1

Operation Manual IP Addressing and IP Performance H3C S5500-SI Series Ethernet Switches. Table of Contents

HP FlexFabric 7900 Switch Series

Table of Contents 1 System Maintaining and Debugging 1-1

Configuring IP addressing

H3C S10500 Switch Series

Operation Manual Routing Protocol. Table of Contents

H3C S5120-HI Switch Series

H3C S7500E-X OSPF Configuration Examples

H3C S5120-SI Switch Series

Table of Contents 1 IPv6 Configuration IPv6 Application Configuration 2-1

Table of Contents 1 IPv6 Configuration IPv6 Application Configuration 2-1

Table of Contents 1 System Maintaining and Debugging Commands 1-1

HP 5920 & 5900 Switch Series

NOTE: The S9500E switch series supports HDLC encapsulation only on POS interfaces. Enabling HDLC encapsulation on an interface

Table of Contents 1 System Maintenance and Debugging Commands 1-1

Contents. Configuring GRE 1

Operation Manual MCE H3C S3610&S5510 Series Ethernet Switches. Table of Contents

Contents. Configuring urpf 1

Using ping, tracert, and system debugging

Configuring basic MBGP

Configuring IP addressing 1

Table of Contents Chapter 1 IP Addressing Configuration

HP FlexFabric 5930 Switch Series

HP 6125 Blade Switch Series

Layer 3 - IP Routing Command Reference

HP FlexFabric 7900 Switch Series

Configuring Static Routing

Contents. Ping, tracert, and system debugging commands 1 debugging 1 display debugging 2 ping 2 ping ipv6 5 tracert 7 tracert ipv6 9

HPE FlexFabric 5940 Switch Series

Table of Contents 1 MBGP Configuration 1-1

The term "router" in this document refers to both routers and Layer 3 switches. Step Command Remarks. ipv6 host hostname ipv6-address

Ping, tracert and system debugging commands

Configuring IPv6 DNS. Introduction to IPv6 DNS. Configuring the IPv6 DNS client. Configuring static domain name resolution

HP 5920 & 5900 Switch Series

Table of Contents. 2 Static Route Configuration Commands 2-1 Static Route Configuration Commands 2-1 delete static-routes all 2-1 ip route-static 2-1

Lab 6.7.1: Ping and Traceroute

HP A5830 Switch Series Layer 3 - IP Services. Configuration Guide. Abstract

HPE FlexNetwork HSR6800 Routers

Table of Contents 1 GRE Configuration Point to Multi-Point GRE Tunnel Configuration 2-1

HP Routing Switch Series

Table of Contents Chapter 1 Tunneling Configuration

Contents. Ping, tracert, and system debugging commands 1. debugging 1 display debugging 1 ping 2 ping ipv6 5 tracert 7 tracert ipv6 10

Internet Protocol. Outline Introduction to Internet Protocol Header and address formats ICMP Tools CS 640 1

HP 6125G & 6125G/XG Blade Switches

Table of Contents 1 MSDP Configuration 1-1

HP 7500 Switch Series

Lecture 6. TCP/IP Network Layer (4)

Operation Manual BFD-GR H3C S3610&S5510 Series Ethernet Switches. Table of Contents

Basic MPLS commands. display mpls forwarding ilm. Syntax. Views. Predefined user roles. Parameters. Usage guidelines. Examples

HP 5120 SI Switch Series

Contents. EVPN overview 1

Command Manual IPv4 Routing H3C S3610&S5510 Series Ethernet Switches. Table of Contents

Operation Manual IPv6 H3C S3610&S5510 Series Ethernet Switches Table of Contents. Table of Contents

Table of Contents 1 IPv6 Configuration IPv6 Application Configuration 2-1

Configuring Routing CHAPTERS

Addressing the Network IPv4

HP A5500 EI & A5500 SI Switch Series Network Management and Monitoring. Configuration Guide. Abstract

Contents. Configuring MSDP 1

Packet Tracer - Subnet Scenario 2 Topology

SecPath Series Firewalls Virtual Firewall Configuration Examples

Table of Contents 1 IGMP Configuration 1-1

H3C MSR Series Routers

Contents. Configuring GRE 1

H3C S10500 Switch Series

Configuring MSDP. Overview. How MSDP operates. MSDP peers

Module 7 Internet And Internet Protocol Suite

Table of Contents 1 MSDP Configuration 1-1

Table of Contents 1 IGMP Snooping Configuration 1-1

CCNA Exploration Network Fundamentals. Chapter 06 Addressing the Network IPv4

HP 5820X & 5800 Switch Series Network Management and Monitoring. Configuration Guide. Abstract

HPE FlexFabric 7900 Switch Series

HP 6125G & 6125G/XG Blade Switches

Implement Static Routes for IPv6 Configuration Example

Configure IP SLA Tracking for IPv4 Static Routes on an SG550XG Switch

Table of Contents 1 IP Address Configuration Commands IP Performance Configuration Commands 2-1

Configuring MLD. Overview. MLD versions. How MLDv1 operates. MLD querier election

Setting IPSec VPN connection between two SMC BR21VPN

Command Manual (For Soliton) IP Address-IP Performance. Table of Contents

HP 3600 v2 Switch Series

HP 6125 Blade Switch Series

Configuring Routes on the ACE

Table of Contents Chapter 1 Multicast VLAN Configuration

RIP Configuration. RIP Overview. Operation of RIP. Introduction. RIP routing table. RIP timers

Transcription:

Table of Contents 1 Static Routing Configuration 1-1 Introduction 1-1 Static Route 1-1 Default Route 1-1 Application Environment of Static Routing 1-2 Configuring a Static Route 1-2 Configuration Prerequisites 1-2 Configuration Procedure 1-2 Displaying and Maintaining Static Routes 1-3 Static Route Configuration Example 1-3 Basic Static Route Configuration Example 1-3 i

1 Static Routing Configuration When configuring a static route, go to these sections for information you are interested in: Introduction Configuring a Static Route Displaying and Maintaining Static Routes Static Route Configuration Example The term router in this document refers to a router in a generic sense or a Layer 3 switch. Introduction Static Route A static route is a manually configured. If a network s topology is simple, you only need to configure static routes for the network to work normally. The proper configuration and usage of static routes can improve network performance and ensure bandwidth for important network applications. The disadvantage of using static routes is that they cannot adapt to network topology changes. If a fault or a topological change occurs in the network, the routes will be unreachable and the network breaks. In this case, the network administrator has to modify the static routes manually. Default Route If the destination address of a packet fails to match any entry in the routing table, the packet will be discarded. After a default route is configured on a router, any packet whose destination IP address matches no entry in the routing table can be forwarded to a designated upstream router. A router selects the default route only when it cannot find any matching entry in the routing table. If the destination address of a packet fails to match any entry in the routing table, the router selects the default route to forward the packet. If there is no default route and the destination address of the packet fails to match any entry in the routing table, the packet will be discarded and an ICMP packet will be sent to the source to report that the destination or the network is unreachable. Default routes can be configured by the network administrator via configuring a default route with both destination and mask being 0.0.0.0. The router forwards any packet whose destination address fails to match any entry in the routing table to the next hop of the default static route. 1-1

Application Environment of Static Routing Before configuring a static route, you need to know the following concepts: 1) Destination address and mask In the ip route-static command, an IPv4 address is in dotted decimal format and a mask can be either in dotted decimal format or in the form of mask length (the digits of consecutive 1s in the mask). 2) Output interface and next hop address While configuring a static route, you can specify either the output interface or the next hop address depending on the specific occasion. The next hop address can not be a local interface IP address; otherwise, the route configuration will not take effect. In fact, all the route entries must have a next hop address. When forwarding a packet, a router first searches the routing table for the route to the destination address of the packet. The system can find the corresponding link layer address and forward the packet only after the next hop address is specified. When specifying the output interface, note that: If the output interface is a Null 0 interface, there is no need to configure the next hop address. If you specify a broadcast interface (such as a VLAN interface) as the output interface, you must specify the corresponding next hop for the output interface. 3) Other attributes You can configure different preferences for different static routes so that route management policies can be applied more flexibly. For example, specifying the same preference for different routes to the same destination enables load sharing, while specifying different preferences for these routes enables route backup. Configuring a Static Route Configuration Prerequisites Before configuring a static route, you need to finish the following tasks: Configure the physical parameters for related interfaces Configure the link-layer attributes for related interfaces Configure the IP addresses for related interfaces Configuration Procedure Follow these steps to configure a static route: To do Use the command Remarks Enter system view system-view Configure a static route ip route-static dest-address { mask mask-length } { next-hop-address interface-type interface-number next-hop-address } [ preference preference-value ] [ description description-text ] Required By default, preference for static routes is 60, tag is 0, and no description information is configured. 1-2

To do Use the command Remarks Configure the default preference for static routes ip route-static default-preference default-preference-value Optional 60 by default When configuring a static route, the static route does not take effect if you specify the next hop address first and then configure it as the IP address of a local interface, such as VLAN interface. If you do not specify the preference when configuring a static route, the default preference will be used. Reconfiguring the default preference applies only to newly created static routes. If the destination IP address and mask are both configured as 0.0.0.0 with the ip route-static command, the route is the default route. Displaying and Maintaining Static Routes To do Use the command Remarks Display the current configuration information Display the brief information of the IP routing table Display the detailed information of the IP routing table View information of static routes Delete all the static routes display current-configuration display ip routing-table display ip routing-table verbose display ip routing-table protocol static [ inactive verbose ] delete static-routes all Available in any view Available In system view Static Route Configuration Example Basic Static Route Configuration Example Network requirements The IP addresses and masks of the switches and hosts are shown in the following figure. Static routes are required for interconnection between any two hosts. 1-3

Figure 1-1 Network diagram for static route configuration Configuration procedure 1) Configuring IP addresses for interfaces (omitted) 2) Configuring static routes # Configure a default route on Switch A. <SwitchA> system-view [SwitchA] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2 # Configure two static routes on Switch B. <SwitchB> system-view [SwitchB] ip route-static 1.1.2.0 255.255.255.0 1.1.4.1 [SwitchB] ip route-static 1.1.3.0 255.255.255.0 1.1.5.6 # Configure a default route on Switch C <SwitchC> system-view [SwitchC] ip route-static 0.0.0.0 0.0.0.0 1.1.5.5 3) Configure the hosts. The default gateways for the three hosts A, B and C are 1.1.2.3, 1.1.6.1 and 1.1.3.1 respectively. The configuration procedure is omitted. 4) Display the configuration. # Display the IP routing table of Switch A. [SwitchA] display ip routing-table Routing Tables: Public Destinations : 7 Routes : 7 Destination/Mask Proto Pre Cost NextHop Interface 0.0.0.0/0 Static 60 0 1.1.4.2 Vlan500 1.1.2.0/24 Direct 0 0 1.1.2.3 Vlan300 1.1.2.3/32 Direct 0 0 127.0.0.1 InLoop0 1.1.4.0/30 Direct 0 0 1.1.4.1 Vlan500 1.1.4.1/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 1-4

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 # Display the IP routing table of Switch B. [SwitchB] display ip routing-table Routing Tables: Public Destinations : 10 Routes : 10 Destination/Mask Proto Pre Cost NextHop Interface 1.1.2.0/24 Static 60 0 1.1.4.1 Vlan500 1.1.3.0/24 Static 60 0 1.1.5.6 Vlan600 1.1.4.0/30 Direct 0 0 1.1.4.2 Vlan500 1.1.4.2/32 Direct 0 0 127.0.0.1 InLoop0 1.1.5.4/30 Direct 0 0 1.1.5.5 Vlan600 1.1.5.5/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 1.1.6.0/24 Direct 0 0 1.1.6.1 Vlan100 1.1.6.1/32 Direct 0 0 127.0.0.1 InLoop0 # Use the ping command on Host B to check reachability to Host A, assuming Windows XP runs on the two hosts. C:\Documents and Settings\Administrator>ping 1.1.2.2 Pinging 1.1.2.2 with 32 bytes of data: Ping statistics for 1.1.2.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 1ms, Maximum = 1ms, Average = 1ms # Use the tracert command on Host B to check reachability to Host A. [HostB] tracert 1.1.2.2 Tracing route to 1.1.2.2 over a maximum of 30 hops 1 <1 ms <1 ms <1 ms 1.1.6.1 2 <1 ms <1 ms <1 ms 1.1.4.1 3 1 ms <1 ms <1 ms 1.1.2.2 Trace complete. 1-5