Topics - Networks
Networking is the act of connecting two or more computers so that they can communicate with each other. The actual methods of connecting and communicating are slightly complicated, but the end result is very useful. -tldp
- The material below was cobbled together for personal use, from attributed sources, and endured some mild look/feel massage.
- Document Purpose: Conveniently scoped refresher on the listed Linux material.
- LPIC2 Prep - Linux Academy
- Photo source by The Roaming Platypus on Unsplash
- Configure a network device to be able to connect to a local, wired or wireless, and a wide-area network.
- Communicate between various subnets within a single network including both IPv4 and IPv6 networks.
205.1 Linux Networking
Interfaces - ifconfig
Use to see general network configuration
ifconfig eth1 192.168.1.2- set ip
ifconfig eth1 down- down adapter These configs are temporary. Need a write to persist. Promiscious mode. Stop ignoring packets not targeted at its ip. Debugging/troubleshooting. ifconfig can on/off.
Routing - ARP
- hostname, ip, route info (routers, switches, etc)
- When a packet flys by, arp will learn about it.
- If you ping and don’t get a response, an incomplete arp entry will go in.
ifconfig is deprecated, use
- arp = ip neigh
- ifconfig = ip addr
- route = ip route
- Do client stuff
205.2 Advanced Troubleshooting
- netstat gives alot of info.
netstat -sgives a summary
netstat -igives a handy col view by adapter, for all the traffic from summary
netstat -rKernel ip routing table
netstat -lJust listening sockets
- list open files
- handy for verifying network (firewall, middle issues, etc)
- can be a factor
Debian and Redhat differences
- “ifcfg-eth1” example
DEVICE=eth1 IPADDR ... NETMASK .. BROADCAST .. ONBOOT=yes BOOTPROTO=none