cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4531
Views
1
Helpful
26
Replies

IP address and Gateway are same?

zillah2004
Level 1
Level 1

Hi All

When I accessed the dial upo internet and when I checked the IP address I found these detaisl ipconfig:

IP: 220.165.165.7

SubentMask: 255.255.255.255

Gateway: 220.165.165.7

1- Can the IP address be similar to gateway?

2- Can subnetmask be as broadcast address?

26 Replies 26

Kevin Dorrell
Level 10
Level 10

In a way, yes. The convention is that if you are your own default gateway, then you simply send the packet onto the link. This has two different implications, depending on whether you are on a multiaccess network or a single link.

If you are on a multiaccess network like Ethernet, and you are your own gateway, and you want to send a packet to any destination, then you put out an ARP request for that destination. Any router or host that can handle that destination will reply. This is known as proxy-ARP.

If you are on a point-to-point network and you are your own gateway, and you want to send a packet to any destination, then you just send the packet on the wire. The packet will be routed by whatever is at the other end of the wire.

As for your subnet mask, this simply means that you are the only host on this link. It's not going to tell you the address at the other end of the link because you have no right to address it directly anyway. It has nothing to do with broadcast addresses - the 255.255.255.255 just means you are a stub host.

Kevin Dorrell

Luxembourg

Thanks Kevin

I am going to discuss with some issue (outside your reply),because I want later to clarify something about ARP request, reply and proxy

Within LAN ,,PCs use MAC addresses to forward Frame , why do we need to use IP address then? Is it because the Packet can not encaplsulated to Frame unless it has pais of IP-MAC ?

Frames are always forwarded across a LAN on the basis of MAC address. LANs only know about MAC addresses. The problem is that applications do not know anything about MAC addresses. The application deals in IP addresses only. It is up to the ARP mechanism to find to corresponding MAC address so that the packet can be forwarded across the LAN (as a frame).

Hope this helps.

Kevin Dorrell

Luxembourg

Thanks Boss

Now if the packets are sent, only the MAC addresses will change during the packets trip through network,,,,Am I right? (i.e. As you know we have IP and MAC addresses for source and destination, only the MAC addresses for destination will change till we reach final destination,,,Am I right?)

Yes .... right so far ....

Now for the ARP request if it has been sent from a node to another node not on the same network, and there are routers in the way to the destination (another node),,,what will change (IP or MAC or both)?

2- Could you please explain more about what you said:

"It is up to the ARP mechanism to find to corresponding MAC address so that the packet can be forwarded across the LAN (as a frame)."

Ah, I see where you are now. The ARP request is not exactly "sent to another node" at all. It is broadcast. It is like public address system in an airport. It says "would such-and-such destination please contact me"? If the destination is on the same network then the destination responds "I'm here". If the destination is on a different network, then any router that knows where he is responds "I can get a message to him." So the router supplies its own MAC address. By proxy. Hence the name "proxy ARP".

Couple of additional points:

1. If the router thinks the destination should be on the same network as the host doing the ARP request, then it will not respond.

2. Proxy ARP works, but it is not the usual way to run a LAN. Normally the host knows the IP address of the router (aka "default gateway"), and ARPs for that, getting back the MAC address of the router instead. Once it knows that, it sends all it's out-of-town packets directly to the router.

I think that covers both your questions, doesn't it? The MAC addresses will change on each hop, just as before, but the source and destination IP remain unchanged. MAC addresses get you across each network. IP addresses get you end-to-end. (OK, I ignored HTTP proxies and stuff like that, but that is another story altogether.)

Kevin Dorrell

Luxembourg

Thanks Kevin

1- You said: "The ARP request is not exactly "sent to another node" at all". Yes, this was my wrong explaination,I am sorry, I am aware of that ARP request is broadcast, and ARP reply is unicast. what I meant that if we have:

Noade A (192.168.0.1) and Node B (200.100.100.3, different network),and there are 2 routers in the way.

A- If Node A try to ping Node B,, in the arp table of Node A if there is no pair of IP-MAC address of Node B, then Node A tries to send ARP request.

Inside ARP requset it will IP-MAC of source which is A, and IP of destination B, but no MAC (unknown).

Now what the first router does with ARP requset that has been sent by A? I knew it will response with its own MAC address and what else ?Form here please explain to me the mechansime.

Because we have two routers (in our case) in the way,,,what will be changed MAC and IP, or only MAC address no IP like data packet, or ----etc?

We are still talking about proxy-ARP here, I presume.

The first router does not really care about what goes on in the second router, or even how many routers are in the way. All it knows is that it has a route to the IP address of the destination. So first router says, ARP-reply "To get to the final destination IP, use my MAC address." That's all.

The source host then sends its data packet with the destination IP address of the final destination, and the destination MAC address of the first router.

IP addresses get you end-to-end, and so do not change on the way through. MAC addresses get you hop-to-hop, and so change at each hop.

Kevin Dorrell

Luxembourg

I think there is another aspect of this that might be helpful. It has to do with what the end station believes is local and what it believes it remote (not on the local wire) and the different behaviors of both.

In the example given where node A is 192.168.0.1 and node B is 200.100.100.3, the question would be does node A recognize that node B is remote. If the end station believes that the destination is remote then it does not ARP for the destination but it forwards the packet to its default gateway. Only if node A believes that node B is local will it ARP (and in that case is dependent of proxy ARP to make things work).

HTH

Rick

HTH

Rick

Thanks Kelvin

You said: "and the destination MAC address of the first router."

Now the ARP request passes the first router and reaches the second router on its way to destination (Node B),,,what will router 2 do? Does it reply again with some thing new?

No the ARP request does not pass the first router. Routers do not forward ARP requests. The router will either respond to the ARP request or it will discard the ARP request.

ARP is defined as a function on the local network (on the same wire) and it is not appropriate to forward ARP to a different network. This is why proxy ARP was developed. Read what Kevin was explaining about proxy ARP - it is a pretty good explanation.

HTH

Rick

HTH

Rick

Thanks Rick

Actually, there is an interesting question about proxy-ARP that I was about to ask, ... but then I worked it out myself. It was this:

In a proxy-ARP reply (from a router), is the "sender IP" field the IP address of the original target, or that of the router? Well, I figure it must be the original target IP, otherwise the requesting host has no handle to identify what the reply is about. But this has two interesting implications:

1. The router spoofs the "sender IP" field. (I suppose that's also what "proxy" means.)

2. The requesting host never gets to know the router's real IP address, or even that it is a router.

Kevin Dorrell

Luxembourg

Review Cisco Networking for a $25 gift card