IP address used by the Router port

Source: Internet
Author: User

Port borrow IP Address

The main purpose of the IP address borrow function is to save valuable IP Address resources. If an interface does not have an IP address, it cannot generate a route and forward packets. The essence of the so-called "borrow IP Address" is that an interface is not configured with an IP address, but you want to use this interface to borrow an IP address from other interfaces with IP addresses, so that the interface can be used normally. If the borrowed interface does not have an ip address, the ip address of the borrowed interface is 0.0.0.0. This function is implemented using the ip unnumbered command.

Note that:

<! -- [If! SupportLists] --> (1) <! -- [Endif] --> the borrower cannot be an Ethernet interface;

<! -- [If! SupportLists] --> (2) <! -- [Endif] --> the address of the borrowed party interface cannot be the borrow address;

<! -- [If! SupportLists] --> (3) <! -- [Endif] --> the address of the borrowed party can be lent to multiple interfaces;

<! -- [If! SupportLists] --> (4) <! -- [Endif] --> the Loopback address can be borrowed from other interfaces, but cannot be borrowed from the addresses of other interfaces.

 

The following experiment:

 


Requirements:

1. Use the OSPF routing protocol to achieve network-wide interconnection.

2. Port S4/0 on the device RSR20-B borrow the IP address of port F0/1 on it.

3. Allow all Intranet users to access pc4.

 

The configuration is as follows:

S3760-A # configure terminal

S3760-A (config) # interface fastethernet 0/1

S3760-A (config-if) # no switchport

S3760-A (config-if) # ip address 192.168.2.1 255.255.255.0

S3760-A (config-if) # no shut

S3760-A (config-if) # exit

S3760-A (config) # interface fastethernet 0/2

S3760-A (config-if) # no switchport

S3760-A (config-if) # ip address 192.168.10.1 255.255.255.0

S3760-A (config-if) # no shut

S3760-A (config-if) # exit

S3760-A (config) # router ospf 1

S3760-A (config-router) # network 192.168.2.0 0.0.255 area 0

S3760-A (config-router) # network 192.168.10.0 0.0.255 area 0

S3760-A (config-router) # exit

S3760-A (config )#

 

RSR20-A (config )#

RSR20-A (config) # interface fastethernet 0/1

RSR20-A (config-if) # ip address 192.168.2.2 255.255.255.0

RSR20-A (config-if) # no shut

RSR20-A (config-if) # exit

RSR20-A (config) # interface S4/0

RSR20-A (config-if) # ip address 192.168.1.3 255.255.255.0

RSR20-A (config-if) # no shut

RSR20-A (config-if) # exit

RSR20-A (config-router) # network 192.168.2.0 0.0.255 area 0

RSR20-A (config-router) # network 192.168.1.0 0.0.255 area 0

RSR20-A (config-router )#

 

RSR20-B # configure terminal

RSR20-B (config) # interface fastethernet 0/1

RSR20-B (config-if) # ip address 192.168.1.2 255.255.255.0

RSR20-B (config-if) # ip nat inside

RSR20-B (config-if) # no shut

RSR20-B (config-if) # exit

RSR20-B (config) # interface fastethernet 0/0

RSR20-B (config-if) # ip address 202.103.24.1 255.255.255.0

RSR20-B (config-if) # ip nat outside

RSR20-B (config-if) # no shut

RSR20-B (config-if) # exit

RSR20-B (config) # interface S4/0

RSR20-B (config-if) # ip unnumbered fastethernet 0/1

RSR20-B (config-if) # no shut

RSR20-B (config) # router ospf 1

RSR20-B (config-router) # network 1921381.0 0.0.0.255 area 0

RSR20-B (config-router) # network 202.103.24.0 0.0.255 area 0

RSR20-B (config-router) # exit

RSR20-B (config) # access-list 10 permit any

RSR20-B (config) # ip nat pool aaa 202.103.24.1 202.103.24.1 netmask 255.255.255.

RSR20-B (config # ip nat inside source list 10 pool aaa overload

 

S3760-B # configure terminal

S3760-B (config) # interface fastethernet 0/1

S3760-B (config-if) # no switchport

S3760-B (config-if) # ip address 192.168.1.1 255.255.255.0

S3760-B (config-if) # no shut

S3760-B (config-if) # exit

S3760-B (config) # interface fastethernet 0/2

S3760-B (config-if) # no switchport

S3760-B (config-if) # ip address 192.168.20.1 255.255.255.0

S3760-B (config-if) # no shut

S3760-B (config-if) # exit

S3760-B (config) # router ospf 1

S3760-B (config-router) # network 192.168.1.0 0.0.255 area 0

S3760-B (config-router) # network 192.168.20.0 0.0.255 area 0

S3760-B (config-router) # exit

S3760-B (config )#

 

 

Summary:

The borrow IP address cannot be an Ethernet interface because it is not supported. You only need to configure an ip unnumbered command on the borrower's port to implement the port borrow function. In addition, we can use the show ip interface brief command to check whether the borrow is successful. When the ip address of the S4/0 interface is 192.168.1.2, it indicates that the borrow is successful. Otherwise, the borrow fails.


This article is from the "wonderful" blog

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.