NetWorking
Basic Networking Concepts
| |||||||||||||||||||||||||||||||||||||
1. What is IP address? IP address is short for Internet Protocol Address. An IP Address is a unique number that devices use in order to identify and communicate with each other on a computer network. If two computers have the same IP addresses, it will cause conflict and cause problem. IP Addresses are written as a sequence of four numbers separated by ".", like this: 208.123.246.35. 2. What is Public IP address? What is Private IP address? Public IP addresses are IP addresses used on Internet. They are internet route-able and are visible to the public. Most people who use Cable/DSL service at home/office obtain one dynamic Public IP address from ISP (Internet Service Provider). Computers on a Local Area Network use Private IP addresses. 192.168.x.x is an example of a Private IP address. 3. What is the purpose of a broadband router? The purpose of a broadband router is to share an internet connection among several computers. The broadband router will get one public IP from your ISP and assign dynamic private IP address to each of your computer. All of your computers will have unique private IP address but will use the same public IP address to browse Internet. The router provides a basic Firewall which can deny access to your local computers from Internet. 4. Why the IP address of my computers matters? Usually computers in the same network use the same first three numbers of their IP address, only the 4th number is different. For example, your router could have IP address 192.168.2.1 while ethernet desktop uses 192.168.2.100 and wireless iPad use 192.168.2.102...etc. If your network uses 192.168.2.x but one computer somehow uses an IP address of 192.168.1.100, then this computer is not in the same IP network and can not communicate with 192.168.2.x network. 5. How to find out my computer's private IP address? If you have Windows 7/Windows Vista computer, click on Start -> go to "Search Programs and fields" field, enter "cmd" hit Enter key. If you have Windows XP computer, click on Start -> Run -> type "cmd" or "command" hit OK. Under the command prompt, type in "ipconfig" hit Enter. You will see your computer's IP address (IPv4 address), subnet mask, and default gateway. Usually the default gateway address is the IP address of your router. 6. How to make my computer obtain a dynamic IP address automatically? Usually we let computers obtain IP address automatically from the router. You can click on Start -> Run -> type "ncpa.cpl" hit OK. In the Network Connection window, right click on "Local Area Connection" and select Properties. Double click on Internet Protocol TCP/IP. Select the option "obtain IP address automatically" and select the option "obtain DNS server address automatically" Click OK. Click OK again. 7. What if I prefer to set a static IP rather than dynamic IP address? If you prefer not to obtain an IP address automatically, you can set static IP address to your computer. Locate your network connection icon in the Network Connection window. Go to the property of the network connection. Go to the Internet Protocol v4 (TCP/IP) Properties. Select the option "use the following IP address". Manually type in your static IP, subnet mask and default gateway. You will also need to manually type in the Primary DNS server address.Click OK twice. 8. What basic tool can I use to trouble shoot my networking problem? The most popular tool is to use the "PING" command under the command prompt. Click on Start -> Run -> type "command" hit OK. Under the command prompt, type in "ping x.x.x.x" hit Enter The x.x.x.x can be the IP address of your gateway. For example, type "ping 192.168.2.1" hit Enter. If you receive 4 replies, it means your computer can see that device and get replies. You also can ping a device on the Internet. For example, "ping 209.191.93.52" is to ping a Yahoo site on Internet. If you can "ping 209.191.93.52" to get 4 replies from 209.191.93.52, you do have a good internet connection. Ping a DNS name on Internet. If you can do "ping www.yahoo.com" and get 4 replies, your computer should able to browse Internet fine. If you can "ping 209.191.93.52" to get 4 replies from 209.191.93.52, but when you "ping www.yahoo.com" you get "unknown host", you have an Internet connection but you have a DNS problem to browse Internet. Check your DNS server address by typing "ipconfig /all" under the command prompt and it will give you some clue. Advanced Networking
IPv6 is the new version of the well known IP protocol, also known as IPv4. IPv6 provides several advantages over IPv4 as well as many new features:
FreeBSD includes the http://www.kame.net/ IPv6 reference implementation and comes with everything needed to useIPv6. This section focuses on getting IPv6 configured and running.
There are three different types of IPv6 addresses:
x:x:x:x:x:x:x:x , where each x represents a 16 bit hex value. An example is FEBC:A574:382B:23C1:AA49:4592:4EFE:9982 .Often, an address will have long substrings of all zeros. A :: (double colon) can be used to replace one substring per address. Also, up to three leading 0 s per hex value can be omitted. For example, fe80::1 corresponds to the canonical form fe80:0000:0000:0000:0000:0000:0000:0001 .A third form is to write the last 32 bits using the well known IPv4 notation. For example, 2002::10.0.0.1 corresponds to the hexadecimal canonical representation 2002:0000:0000:0000:0000:0000:0a00:0001 , which in turn is equivalent to2002::a00:1 .To view a FreeBSD system's IPv6 address, use ifconfig(8):
rl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 inet 10.0.0.10 netmask 0xffffff00 broadcast 10.0.0.255 inet6 fe80::200:21ff:fe03:8e1%rl0 prefixlen 64 scopeid 0x1 ether 00:00:21:03:08:e1 media: Ethernet autoselect (100baseTX ) status: activeIn this example, fe80::200:21ff:fe03:8e1%rl0 is an auto-configured link-local address which was automatically generated from the MAC address.Some IPv6 addresses are reserved. A summary of these reserved addresses is seen in Table 30.3, “Reserved IPv6Addresses”:
Table 30.3. Reserved IPv6 Addresses
For further information on the structure of IPv6 addresses, refer to RFC3513.
To configure a FreeBSD system as an IPv6 client, add these two lines to
rc.conf :ifconfig_em0_ipv6="inet6 accept_rtadv" rtsold_enable="YES"The first line enables the specified interface to receive router solicitation messages. The second line enables the router solicitation daemon, rtsol(8). For FreeBSD 8. x , add a third line:ipv6_enable="YES"If the interface needs a statically assigned IPv6 address, add an entry to specify the static address and associated prefix length: ifconfig_fxp0_ipv6="inet6 2001:db8:4672:6565:2026:5043:2d42:5344 prefixlen 64"On a FreeBSD 8. x system, that line uses this format instead:ipv6_ifconfig_fxp0="2001:db8:4672:6565:2026:5043:2d42:5344"To assign a default router, specify its address: ipv6_defaultrouter="2001:db8:4672:6565::1"
In order to connect to other IPv6 networks, one must have a provider or a tunnel that supports IPv6:
Note:
Install the net/freenet6 package or port for a dial-up connection.
/etc/rc.conf settings that will persist through reboots.The first /etc/rc.conf entry creates the generic tunneling interface gif0 :gif_interfaces="gif0"Next, configure that interface with the IPv4 addresses of the local and remote endpoints. Replace MY_IPv4_ADDR andREMOTE_IPv4_ADDR with the actual IPv4 addresses:gifconfig_gif0="MY_IPv4_ADDR REMOTE_IPv4_ADDR"To apply the IPv6 address that has been assigned for use as the IPv6 tunnel endpoint, add this line, replacing MY_ASSIGNED_IPv6_TUNNEL_ENDPOINT_ADDR with the assigned address:ifconfig_gif0_ipv6="inet6 MY_ASSIGNED_IPv6_TUNNEL_ENDPOINT_ADDR"For FreeBSD 8. x , that line should instead use this format:ipv6_ifconfig_gif0="MY_ASSIGNED_IPv6_TUNNEL_ENDPOINT_ADDR"Then, set the default route for the other side of the IPv6 tunnel. Replace MY_IPv6_REMOTE_TUNNEL_ENDPOINT_ADDR with the default gateway address assigned by the provider:ipv6_defaultrouter="MY_IPv6_REMOTE_TUNNEL_ENDPOINT_ADDR"If the FreeBSD system will route IPv6 packets between the rest of the network and the world, enable the gateway using this line: ipv6_gateway_enable="YES"
This section demonstrates how to setup rtadvd(8) to advertise the IPv6 default route.
To enable rtadvd(8), add the following to /etc/rc.conf :rtadvd_enable="YES"It is important to specify the interface on which to do IPv6 router solicitation. For example, to tell rtadvd(8) to use fxp0 :rtadvd_interfaces="fxp0"Next, create the configuration file, /etc/rtadvd.conf as seen in this example:fxp0:\ :addrs#1:addr="2001:471:1f11:246::":prefixlen#64:tc=ether:Replace fxp0 with the interface to be used and 2001:471:1f11:246:: with the prefix of the allocation.For a dedicated /64 subnet, nothing else needs to be changed. Otherwise, change the prefixlen# to the correct value.
When IPv6 is enabled on a server, there may be a need to enable IPv4 mapped IPv6 address communication. This compatibility option allows for IPv4 addresses to be represented as IPv6 addresses. Permitting IPv6 applications to communicate with IPv4 and vice versa may be a security issue.
This option may not be required in most cases and is available only for compatibility. This option will allow IPv6-only applications to work with IPv4 in a dual stack environment. This is most useful for third party applications which may not support an IPv6-only environment. To enable this feature, add the following to /etc/rc.conf :ipv6_ipv4mapping="YES"Reviewing the information in RFC 3493, section 3.6 and 3.7 as well as RFC 4038 section 4.2 may be useful to some adminstrators. |
0 comments:
Post a Comment