cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
979
Views
0
Helpful
5
Replies

IP assigning

moament
Level 1
Level 1

Dear all,

I found some article before talked about that we can assigen IP address to router and then telnet to it and configure it , although this router is not configured before , and it based on that the router is connected to switch or another router via ethernet and I can learn the MAC address of the target router and then map IP to this MAC!

actually I didn't understand it , but the idea is very good , so can any one tell me if there is something like that , to telnet to router although it has no ip configuration , it will help a lot of problems for me

Thanks & BR

Ahmed

5 Replies 5

paddyxdoyle
Level 6
Level 6

Hi,

Its called DHCP.

Some Routers, PIX firewalls, Aironet Access Points etc come with their LAN interfaces configured as DHCP clients.

So if you connect these interfaces to a LAN segment that has a DHCP server on it or knows how to get to a DHCP server, then the devices interfaces will recieve an IP address.

If you know which switch port the device is connected to, you can record its MAC address and compare this will the address leases on your DHCP server or routers ARP table and thus discover the devices IP address.

Alternatively you can download a freeware DHCP server and install it onto a laptop. Set up a scope on your DHCP server with one IP address in it. Connect your laptop to your device with a cross over cable and then the device will recieve an address via DHCP from your laptop that you know and you will be able to telnet to your device.

Good luck

PD

jaregalado
Level 1
Level 1

Hello,

Some low end network devices (particularly print servers, terminal servers and network printers) support something called "IP gleaning".

AFAIK no Cisco devices on the market support this and DHCP is the only option then.

Nonetheless it is an interesting procedure used for configuring an IP address on the device using an Ethernet connected PC.

I´ve seen this technique implemented on Axis print servers.

I'll try to explain it here:

Suppose 00-07-b3-2c-37-4a is the MAC address of the device and 10.1.18.1 is the ip address I want to assign. Then, using the arp command under Windows command line you manually set the ARP table on your PC.

arp -s 10.1.18.1 00-07-b3-2c-37-4a

This basically means: In order to reach the 10.1.18.1 ip address physically encapsulate the IP datagrams using an Ethernet frame with destination address 00-07-b3-2c-37-4a.

You verify the arp settings with this command:

arp -a

Interface: 10.1.18.73 --- 0x2

Internet Address Physical Address Type

10.1.18.1 00-07-b3-2c-37-4a static

You can see type is now "Static". This means the entry was manually configured.

Then ping the device in question.

How does the PC know how to reach the device if no ip address has been configured on it yet ? The Ethernet frame will be delivered to the device using the MAC address found on the ARP table, this happens all the time on any LAN.

ping 10.1.18.1

Pinging 10.1.18.1 with 32 bytes of data:

Reply from 10.1.18.1: bytes=32 time<1ms TTL=255

Reply from 10.1.18.1: bytes=32 time=3ms TTL=255

Reply from 10.1.18.1: bytes=32 time=3ms TTL=255

Reply from 10.1.18.1: bytes=32 time=3ms TTL=255

The device in question just fresh out of the box receives the IP datagram encapsulated on the Ethernet frame addressed to it, and gets its own

IP address from the IP destination address field on the IP header, after this you telnet to the device and just complete the configuration, and that's it !

Hope you find the information useful.

Regards.

Thanks a lot , but actually I talk about 2 cisco devices switch and router , I need 2 assigen an IP to the router not configured and telnet to it and configure it

is that possible by any way , and not using DHCP

thanks

Kevin Dorrell
Level 10
Level 10

There is a way. It's called autoinstall, and it only works if you have a completely blank router, i.e. it has nothing in its NVRAM configuration yet. You need another router as well. If you want to do it via a serial interface, you will need a back-to-back DCE-DTE serial cable. So much for the requirements.

The procudure for serial is quite simple. If your known router has the address, say, 192.168.1.1/30 on its serial interface, boot the new router, and it will get the address 192.168.1.2/30 on its serial interface. You can then use telnet to log into it.

The procedure via the LAN interface requires DHCP.

Here is a document about the feature:

http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/ffun_c/ffcprt1/fcf002.htm#wp1027936

Kevin Dorrell

Luxembourg

I agree with Kevin that the answer to the original post is the feature of autoinstall which has been part of the IOS for a very long time. It was desinged to allow a fresh router to learn its IP address, and in fact to download a config file after the IP address was learned.

Autoinstall running over point to point serial lines uses a protocol called SLARP to learn its IP address.

There is an alternative for Autoinstall over LAN interfaces that does not use DHCP. Autoinstall will first try serial intefaces to learn its IP address and if that does not work, the router will try a protocol called RARP (Reverse ARP) over its Ethernet interfaces. The ARP protocol which is very familiar says that the device knows an IP address and is looking for the MAC. The RARP protocol is much less well known was developed for things like diskless workstations and says that I know a MAC address and want to find the associated IP address. If you have a device on the segment configured to provide RARP then the new router can learn its address without using DHCP. While RARP still does work, Kevin is right that DHCP is now the preferred way to do autoinstall over LAN interfaces.

HTH

Rick

HTH

Rick

Review Cisco Networking for a $25 gift card