{"id":405,"date":"2012-03-24T13:56:53","date_gmt":"2012-03-24T20:56:53","guid":{"rendered":"http:\/\/www.vadapt.com\/?p=405"},"modified":"2012-03-24T13:56:53","modified_gmt":"2012-03-24T20:56:53","slug":"unix-network-ip-address-configuration","status":"publish","type":"post","link":"http:\/\/iben.users.sonic.net\/wp\/unix-network-ip-address-configuration\/","title":{"rendered":"Unix Network IP Address Configuration"},"content":{"rendered":"<p>To temporarily configure an IP address, you can use the ifconfig command in the following manner. Just modify the IP address and subnet mask to match your network requirements.<\/p>\n<p>sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0<\/p>\n<p>To verify the IP address configuration of eth0, you can use the ifconfig command in the following manner.<\/p>\n<p>ifconfig eth0<\/p>\n<p>eth0 Link encap:Ethernet HWaddr 00:15:c5:4a:16:5a<\/p>\n<p>inet addr:10.0.0.100 Bcast:10.0.0.255 Mask:255.255.255.0<\/p>\n<p>inet6 addr: fe80::215:c5ff:fe4a:165a\/64 Scope:Link<\/p>\n<p>UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<\/p>\n<p>RX packets:466475604 errors:0 dropped:0 overruns:0 frame:0<\/p>\n<p>TX packets:403172654 errors:0 dropped:0 overruns:0 carrier:0<\/p>\n<p>collisions:0 txqueuelen:1000<\/p>\n<p>RX bytes:2574778386 (2.5 GB) TX bytes:1618367329 (1.6 GB)<\/p>\n<p>Interrupt:16<\/p>\n<p>To configure a default gateway, you can use the route command in the following manner. Modify the default gateway address to match your network requirements.<\/p>\n<p>sudo route add default gw 10.0.0.1 eth0<\/p>\n<p>To verify your default gateway configuration, you can use the route command in the following manner.<\/p>\n<p>route -n<\/p>\n<p>Kernel IP routing table<\/p>\n<p>Destination Gateway Genmask Flags Metric Ref Use Iface<\/p>\n<p>10.0.0.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0<\/p>\n<p>0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0<\/p>\n<p>If you require DNS for your temporary network configuration, you can add DNS server IP addresses in the file \/etc\/resolv.conf. The example below shows how to enter two DNS servers to \/etc\/resolv.conf, which should be changed to servers appropriate for your network. A more lengthy description of DNS client configuration is in a following section.<\/p>\n<p>nameserver 8.8.8.8<\/p>\n<p>nameserver 8.8.4.4<\/p>\n<p>If you no longer need this configuration and wish to purge all IP configuration from an interface, you can use the ip command with the flush option as shown below.<\/p>\n<p>ip addr flush eth0<\/p>\n<p>[Note]<\/p>\n<p>Flushing the IP configuration using the ip command does not clear the contents of \/etc\/resolv.conf. You must remove or modify those entries manually.<\/p>\n<p>via <a href=\"https:\/\/help.ubuntu.com\/11.10\/serverguide\/C\/network-configuration.html\">Network Configuration<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To temporarily configure an IP address, you can use the ifconfig command in the following manner. Just modify the IP address and subnet mask to match your network requirements. sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0 To verify the IP address configuration of eth0, you can use the ifconfig command in the following manner. ifconfig eth0 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-405","post","type-post","status-publish","format-standard","hentry","category-virtualization"],"_links":{"self":[{"href":"http:\/\/iben.users.sonic.net\/wp\/wp-json\/wp\/v2\/posts\/405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/iben.users.sonic.net\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/iben.users.sonic.net\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/iben.users.sonic.net\/wp\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/iben.users.sonic.net\/wp\/wp-json\/wp\/v2\/comments?post=405"}],"version-history":[{"count":1,"href":"http:\/\/iben.users.sonic.net\/wp\/wp-json\/wp\/v2\/posts\/405\/revisions"}],"predecessor-version":[{"id":406,"href":"http:\/\/iben.users.sonic.net\/wp\/wp-json\/wp\/v2\/posts\/405\/revisions\/406"}],"wp:attachment":[{"href":"http:\/\/iben.users.sonic.net\/wp\/wp-json\/wp\/v2\/media?parent=405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/iben.users.sonic.net\/wp\/wp-json\/wp\/v2\/categories?post=405"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/iben.users.sonic.net\/wp\/wp-json\/wp\/v2\/tags?post=405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}