DHCP Address Pool
dhcp address 192.168.1.5-192.168.1.132 inside
DHCP DNS Servers
dhcp dns 18.104.22.168
DHCP Lease Length
dhcp lease 3000 (in seconds)
DHCP Domain Name
dhcp domain testing.com
dhcp option 3 [gateway ip]
Enable DHCP Daemon
dhcp enable inside
Used in Layer 2, an ARP’s goal is to find the MAC address of a host, given the IP address. If the sender knows the host is on the same subnet, it’ll send the ARP request, once it receives a response, it’ll have that host’s MAC address. At this point the two hosts can communicate directly without a router.
Routers will ARP when forwarding data from another network. It needs the MAC address of the destination in order to send out a Layer 2 frame. It’ll ask “Who has 22.214.171.124?”
OS and router cache ARP requests so they don’t have to be sent for every single packet. They store all ARP broadcasts that have been seen so that they don’t even have to be seen on the first request. A RARP is the opposite where the hosts ask “Who am I?” It’s an alternative to DHCP and is mainly used when a new machine boots up and needs an IP.
Proxy ARP is when a host gives a false ARP response, usually for a host that can’t send ARP requests. Routers normally proxy ARP for addresses outside the subnet range. Gratuitous ARP is an ARP for itself. It is used to update changes in IP or detecting other hosts with the same IP address. Promiscuous ARP can change the IP/MAC mappings.
You can think of VLANs as segmenting a switch into multiple networks. Each port could belong to a different VLAN. Contrary to what some believe, VLANs should not be a security mechanism. The bridge table can be flooded and switch can start to act like a hub, breaking the VLAN broadcast segmentation.
A router is required if an ARP request goes unanswered. That means the host is not on your local network. So in order to connect multiple VLANs:
- You can connect a port from each VLAN to a router and set up the routes.
- You can use virtual interfaces in each VLAN. Layer 3 switches.
- With 802.1q you can tag frames with VLAN identifiers. This enables you to connect multiple switches to the same VLAN.
- Tag Protocol Identifier (TPID)
- Tag Control Information (TCI)
- Truck ports
Used to be called “bridges.” Recall that there are really three types of network equipment:
- Hubs/Repeaters – Layer 1 devices that just forward everything blindly, including collisions/errors.
- Bridges/Switches – Layer 2 devices that flood only broadcasts but has the capability to learn where unicast frames go.
- Routers – Operate at layer 3. Some routers are also switches.
Switches can store information on where certain hosts are via a bridge table. This table lists the MAC address and the associated port. Multiple MAC addresses could be assigned to a single port (For example when you’re daisy chaining switches). This is called adaptive learning.
Unicast Segmentation – Switches can limit which hosts can hear unicast frames.
Collision Domain – Not usually a problem these days.
Broadcast Domain – Segment where broadcast frames can be heard.
Store-and-forward – Traditional approach with CRC checks.
Cut-through Forwarding – The switch will just look at the destination MAC and send frames directly. No CRC checks.
Adjusting window size and window scaling options, and buffers (mbufs).
- net.ipv4.tcp_mem = 98304 131072 196608
- Register: \HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
- Add DWORD named “TcpWindowSize” and set it to 131400 (decimal)
- Tcp1323Opts should be set to 3 (rfc 1323 scaling and timestamps)
- ForwardBufferMemory 8000
- NumForwardPackets 6000
Ethernet only deals with MAC addresses. It doesn’t involve any routing or packets. It works with Frames.
- Preamble – Start bits
- Destination (6 bytes) – Destination MAC address
- Source (6 bytes) – Source MAC address
- Length/Type (2 bytes) – Length and EtherType
- Payload (1500 bytes) – Data, zero padded
- FCS (4 bytes) -Frame checksum, CRC
The most important part is the EtherType
- 0x800 – an IP header is next
- 0x806 – ARP is on the way
- 0x8035 – RARP is coming
- 0x810 – this has 801.1q VLAN tags
They can all live in the broadcast domain simultaneously.