diff options
author | Silvino Silva <silvino@bk.ru> | 2016-10-16 15:28:56 +0100 |
---|---|---|
committer | Silvino Silva <silvino@bk.ru> | 2016-10-16 15:38:43 +0100 |
commit | fef9ed6a55e118baacefe32caa740650ad01ecc3 (patch) | |
tree | b1b8d794b145431b9b297f399f7e4396b810ed57 /core/network.html | |
parent | 041c2fb6ddca26f2527a4e8ef4ba44ffb08b1bd9 (diff) | |
download | doc-fef9ed6a55e118baacefe32caa740650ad01ecc3.tar.gz |
More compatible ip for init net script
and revision of core network document.
Diffstat (limited to 'core/network.html')
-rw-r--r-- | core/network.html | 50 |
1 files changed, 20 insertions, 30 deletions
diff --git a/core/network.html b/core/network.html index b8b7617..74cce0e 100644 --- a/core/network.html +++ b/core/network.html @@ -51,6 +51,20 @@ <p>Current example of <a href="conf/rc.d/net">/etc/rc.d/net</a>;</p> <pre> + Address: 192.168.0.1 11000000.10101000.00000000 .00000001 + Netmask: 255.255.255.0 = 24 11111111.11111111.11111111 .00000000 + Wildcard: 0.0.0.255 00000000.00000000.00000000 .11111111 + => + Network: 192.168.0.0/24 11000000.10101000.00000000 .00000000 (Class C) + Broadcast: 192.168.0.255 11000000.10101000.00000000 .11111111 + HostMin: 192.168.0.1 11000000.10101000.00000000 .00000001 + HostMax: 192.168.0.254 11000000.10101000.00000000 .11111110 + Hosts/Net: 254 (Private Internet) + </pre> + + <p>Other IP class that can used for private network;</p> + + <pre> Address: 10.0.0.1 00001010.00000000.00000000 .00000001 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111 .00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000 .11111111 @@ -62,47 +76,23 @@ Hosts/Net: 254 (Private Internet) </pre> + <p>Manual configuring like net script;</p> + <pre> # DEV=enp8s0 - # ADDR=10.0.0.1 + # ADDR=192.168.1.9 # MASK=24 - # GW=10.0.0.1 - # ip addr flush dev ${DEV} - # ip route flush dev ${DEV} + # GW=192.168.1.254 </pre> <pre> + # ip addr flush dev ${DEV} + # ip route flush dev ${DEV} # ip addr add ${ADDR}/${MASK} dev ${DEV} broadcast + # ip link set ${DEV} up - </pre> - - <p>Script don't add above network as gateway;</p> - - <pre> # ip route add default via ${GW} </pre> - <p>Other IP class used in home setups;</p> - - <pre> - Address: 192.168.0.1 11000000.10101000.00000000 .00000001 - Netmask: 255.255.255.0 = 24 11111111.11111111.11111111 .00000000 - Wildcard: 0.0.0.255 00000000.00000000.00000000 .11111111 - => - Network: 192.168.0.0/24 11000000.10101000.00000000 .00000000 (Class C) - Broadcast: 192.168.0.255 11000000.10101000.00000000 .11111111 - HostMin: 192.168.0.1 11000000.10101000.00000000 .00000001 - HostMax: 192.168.0.254 11000000.10101000.00000000 .11111110 - Hosts/Net: 254 (Private Internet) - </pre> - - <pre> - # DEV=enp8s0 - # ADDR=192.168.1.1 - # MASK=24 - # GW=192.168.1.254 - </pre> - <h2 id="iptables">2.1.3. Iptables</h2> <p>For more information about iptables read |