Skip to main content

No Default gateway configured

More
19 years 11 months ago #6719 by trmmjpz
Hello,
If i dont have a default gateway configured and i try to send a pkt to a different subnet what will the host do? Will it reject the pkt ?

On Linux - I configured two hosts connected to a hub with 2 ip addr (10.1.1.1 and 198.1.1.1). If i dont specify a default gateway the 2 hosts can ping each other. What does the IP forwarding algorithm do here?

Thanks,
- K
More
19 years 11 months ago #6729 by sahirh
What subnet masks did you configure ?

Sounds like it couldn't find a route so it just arped on the subnet and got a reply.

Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
More
19 years 11 months ago #6767 by noddy938
trmmjpz,

It all depends as Sahir said the subnet mask, you have used. Anyway just to give you a brief idea of what actually happens when you ping.

When you ping any IP address the computer ANDs the destination IP address with the SUBNET MASK of the computer to find if the destination is within the same network or not.

--> Once the computer finds that the destination IP address is well within its NETWORK...it would try to find the MAC address of the machine, first by checking the ARP cache if not sucessful it would use the ARP protocol to find the MAC of the computer. Once it gets the MAC of the computer the packets would be forwarded to the particular computer.

--> Once the computer finds that the destination IP address is not within the NETWORK of the computer, it would check if there is any DEFAULT GATEWAY to who it can send the packet(who MIGHT know where the destination IP address is or atleast a route to it). In this case the computer would just forward the packet to the default gateway, once again doing the same AND process.

You still can forward packets to a different network without a default gateway...concept of PROXY ARP..where one machine(usually router connecting two different networks) does proxy for the other.
Time to create page: 0.115 seconds