i've been reading "tcp/ip illustrated" and i started reading about ip forwarding. all about how you can receive a datagram and work out where to send it next based on the desination ip and your routing table. but what confused me is how (in a home network setting) the table itself is populated. is there a lower layer protocol at work here? does it come along with dhcp? or is it simply based on the ip address and netmask of each interface? i do know (from other books) that in the early days of ethernet one had to set up routing tables by hand, but i know i didn't do that.
in home networking setting you are probably using only one network (meaning same network address and mask for all hosts, so routing is not really happening inside) There is default gateway, and all packets addressed elsewhere are sent to default gateway. Forwarding packets on the switch happens based on mac addresses / IP address pair from received packets. In larger networks, where you need to route packets from one network to another, besides static routing there are routing protocols like rip, eigrp, ospf and others. yaMan