1

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.

2 Answers 2

1

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

0

For a typical host getting its IP address by DHCP, the only normal routes it will have are to its own network and to its default gateway. It gets both of these by DHCP.

16
  • okay, great, new question. if i want to have 2 seperate subnets on my network (one assigned by dhcp and one assigned by hand), i can set up dhcp to send out both routes?
    – Rob M
    Dec 8, 2012 at 8:29
  • Just make the gateway between the two subnets the default router and it will all work without any additional routes. Otherwise, tell us what you're using as a DHCP server. Dec 8, 2012 at 8:36
  • right now, i'm using a dsl modem/router thing. what i'm thinking is having MY computers on their own subnet (for no other reason than just 'cause). if i let them all run on the same network, but have all the computers use both routing rules, i shouldn't need a router to interface them, right?
    – Rob M
    Dec 8, 2012 at 8:42
  • Yes, you would need a router to interface them. You need a router to interconnect distinct subnets. What would the route to the other subnet have as its next hop if not a router that connects to that subnet? Dec 8, 2012 at 8:44
  • one of my boxes has 2 NICs, and i configured one with a static ip (10.0.0.1) and by adding a static route to my other box (192.168.1.68) i could access the other subnet. is this some kind of bad practice?
    – Rob M
    Dec 8, 2012 at 8:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .