DNS, and DNS pass-through: Already went through this with 435 - sorry if you're in both Let's take a quick look at what's in a DNS query! Interpreting a header with a C struct: Kinda like those old keyboard overlay things A summary of last time: We set up orcrist with NAT and bridging For this kind of thing, I suspect NAT is more common Still, you can do either Note: FreeBSD and Linux support RIP I have NAT set up on nimrod for stuff Let's take a look at the script that sets it up Although I don't think I actually have it configured that way! Let's look at the routing table Why? Limited number of networking ports available Defeat MAC address based security Protect a machine with vulnerable open ports Limit a machine's access to the network Put a machine on wifi that only has wired Probably some other use cases out there A bit of a think-through: What's the router do when it receives an ethernet frame? Ignore it? If the CRC is wrong If the MAC address doesn't match that interface on the router De-encapsulate and take a look at the IP address? "de-encapsulate" = "look at the data part of the ethernet frame" It's not like you have to decrypt it or remove anything In C, it's probably something like this: char* ip_header_start = frame_start + frame_header_size; struct ip_header *iph = (struct ip_header*)ip_header_start; // After this, use iph->destination_address or whatever to get fields Kinda, anyway. Linux, for example, uses a struct sk_buff for socket data Decide where the packet should go Depends on our routing rules Destinations, subnet mask, etc Need to know what interface to send it out, with what destination MAC Remember: We can't send anything without a MAC address! Re-encapsulate, and send it out the selected interface Efficiency note: Can probably just amend the frame header in-place Remember to decrease TTL Do we want to log it? Probably not! Logging could quickly become the limiting factor for performance We've been adding some very simple routing rules! Next: Setting up this kind of thing on Cisco equipment Packet Tracer! A quick question to address: "isr" in "Cisco 4331 ISR" Integrated Services Router We can put a switch module in it Might be other modules too, that I don't know about Alright, the configuration: Three routers on different networks Let's go Internet-routable this time One router to go between each of them This'll be a bit big, as far as configurations go Lab today: https://blog.certskills.com/clab118 Yes, it's a lot of entering routes Learn appreciation for RIP, OSPF, etc?