LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   linux, 2 xp, pc's + static IP's (https://www.linuxquestions.org/questions/linux-networking-3/linux-2-xp-pcs-static-ips-115069/)

shania 11-11-2003 10:44 PM

linux, 2 xp, pc's + static IP's
 
I had a friend helping me with networking, and we ran into trouble (I think) and now he isnt avilable for a while and I re-installed mandrake 9.1 so maybe someone here can walk me through how to do what I want to do,

I have a static IP that came with my adsl (Ichanged isp's so I can get static IP)

And we bought a class 29/ block of 8 ip's (6usable) for now we want to have linux box to act as what I am told os to act as a router.

I have 2 nic cards in linux box.

eth0 runs adsl. (own static ip)
eth1 runs from box to a hub

from hub 2 other pc's plug in and soon a 3rd.

I can get my adsl to work on linux but how do I add one of my static ip's, broadcast and network ip to eth1 and make it permanet ?

My friend was doing this for me and net would work on all pc's but then it would just drop off and not come back up on linux and now he isnt around for a while and since I re-installed mandrake I have noidea how he set it up.

reason why we use external indiviual static ip's on pc's is so we dont run into gaming issues like we had when they were on dynamic.

I Hope someone understands this sort of networking and can assist me in very easy directions/explanations in how to do what it is I am trying to do.

I think i need ip forwardig or something as well enabled ?

shania 11-12-2003 01:26 AM

bugger no replies yet

dolvmin 11-12-2003 02:38 AM

What you are trying to do is set the Linux Box to act as a proxy server. There is a feature in there somewhere (I know it's in Red Hat) that allows you to enter a MAC Address. It will specify the word "Clone"/"Cloning".

What's happening here is the TCP/IP Protocal is not continuing the packet data flow to the following computer because it is not bound to it's MAC Address. As a result, the TCP/IP Protocal believes you have 2 LANs interconnected to 1 WAN. LAN 1 is Private and unable to fead packets to LAN 2. LAN 2 is connected to WAN and is allowed to fead packets to the WAN. To fix this, you must make the TCP/IP Protcal believe you have 1 LAN. You must bind the MAC address of the target to your 2nd NIC card in the Linux box. This would be called Cloning the Mac Address. When this is done, the TCP/IP Protocal can simulate a binding to the target, and allow packets to transmit through the Linux Box, emulating 1 LAN. This is exceptionally tricky and will require trial and error. Keep in mind however. I would asume he may have used a "Router" as the MAC Address to bind. I do not believe hubs have them. If a router is not directly hooked up to the Linux Box, he may have bound the MAC Address of a router that filters through the Hub.

Hope this helps.

adz 11-12-2003 03:39 AM

In other words you want the linux PC to act as the gateway for you network. It's a fairly involved (but well documented) process. Just go the this link: http://www.tldp.org/HOWTO/IP-Masquer...WTO/index.html. It's the IP-Masquerading HOWTO. That (or network address translation) is the name of what you are trying to do. It's very comprehensive. I wont repeat everything there but I'll be happy to answer questions about it.

DavidPhillips 11-12-2003 07:33 PM

you could also go for a bridge setup

proxyarp

http://www.linuxquestions.org/questi...392#post188392


bridge

http://www.linuxquestions.org/questi...451#post188451

dolvmin 11-14-2003 03:36 PM

Quote:

Originally posted by DavidPhillips
you could also go for a bridge setup

proxyarp

http://www.linuxquestions.org/questi...392#post188392


bridge

http://www.linuxquestions.org/questi...451#post188451

Unless your refering to something else, I do not believe a "bridge" would solve the problem.

Bridge is used to interconnect 2 networks together. An example:
Ethernet w/ Token Ring
Ethernet w/ Appletalk
Token Ring w/ Appletalk
Ethernet w/ Ethernet
Appletalk w/ Appletalk
Token Ring w/ Token Ring
etc.

A bridge simply fowards the packets but does not route them. But you know what? I might be wrong, so who knows.

DavidPhillips 11-14-2003 05:30 PM

That's what I thought we were doing. The linux box is connected to the Internet and we want to use valid ip addresses on the internet through the linux box. The way I see it the packets will go through the linux box to the ip address it's sent to. The Linux box would only use one ip address.

I'm not sure what the difference between proxyarp and bridge would be in this case, other than the bridge works better. Maybe if there is some other reason to have a second ip address on the router, but it was not stated as needing one for a purpose.


All pcs will use the same gateway.

dolvmin 11-14-2003 05:48 PM

Re: linux, 2 xp, pc's + static IP's
 
Quote:

Originally posted by shania

And we bought a class 29/ block of 8 ip's (6usable) for now we want to have linux box to act as what I am told os to act as a router.

My understanding was we needed to set this up as a router. I may be wrong though. Who knows, I'm just here for fun. <smiles>

I found out however, my previous remark was incorrect. He does not want a proxy server. (I got that from someone else and was repeating the mistake.)

What he wants "IS A GATEWAY". I do not think he can connect a bridge directly to a router, but he could connect it to a hub. However, that would mean only 1 computer could connect at 1 given time.

DavidPhillips 11-14-2003 07:07 PM

The "bridge" will connect to the Internet on one interface and to a hub on the other, where the other systems are connected.

dolvmin 11-14-2003 08:03 PM

Quote:

Originally posted by DavidPhillips
The "bridge" will connect to the Internet on one interface and to a hub on the other, where the other systems are connected.
Yes, but the the TCP/IP Protocol must bind to a MAC address to generate a given IP address. This IP address is the target location of which packets are sent to and from when connected to the ISP. If there is not a system that duplicates the packets and re-routes them to addition IP addresses, then only 1 IP address can connect to the ISP. This means that with a bridge, switch, or hub, the packets would be sent to only one IP address. That would be the first one to initialize the connection.

DavidPhillips 11-14-2003 08:58 PM

I think I'm following you now.

Here is what I'm not clear on.

Lets say that pc1 sends a packet through the bridge with it's mac address to the isp's router. The router receives the packet, it will pluck the IP packet out of the Ethernet frame, leaving the MAC information behind. It will then inspect the destination IP address in the packet and use its routing table to determine the IP address of the next router on the path to this destination.

The router will then use the ARP-ing process to get the MAC address of this next hop router. It will then re-encapsulate the packet in an Ethernet frame with the new MAC address and will then send the frame to the next hop router. This relaying process continues until the packet reaches the target computer.

When the packet comes back to my understanding it will exit the interface of which it entered on the isp's router hitting our Linux routers external interface, thereby exiting the internal interface into the hub and will be picked up by pc1.

DavidPhillips 11-14-2003 09:03 PM

If this can't work for some reason then just revert back to my first link and use a proxyarp.

dolvmin 11-15-2003 03:39 AM

Quote:

Originally posted by DavidPhillips
I think I'm following you now.

Here is what I'm not clear on.

Lets say that pc1 sends a packet through the bridge with it's mac address to the isp's router. The router receives the packet, it will pluck the IP packet out of the Ethernet frame, leaving the MAC information behind. It will then inspect the destination IP address in the packet and use its routing table to determine the IP address of the next router on the path to this destination.

The router will then use the ARP-ing process to get the MAC address of this next hop router. It will then re-encapsulate the packet in an Ethernet frame with the new MAC address and will then send the frame to the next hop router. This relaying process continues until the packet reaches the target computer.

When the packet comes back to my understanding it will exit the interface of which it entered on the isp's router hitting our Linux routers external interface, thereby exiting the internal interface into the hub and will be picked up by pc1.

Okay, but we are talking about ARP now. That's a half brother to the TCP/IP, big different story. <smiles> At this point, it comes down to what ISP you use. If your getting involved with using UDP ports, like that of AOL, you may still have a problem. Never tried it, but you might get away with using ARP.

DavidPhillips 11-15-2003 05:32 AM

If you setup a proxyarp then you will in effect have a router.

I cannot test the bridge over the internet because I only have one ip address, however where I did test it was inside my lan. I can hookup pc's to a bridge's internal interface, and use my router on the bridges external interface as the gateway. In that case everything worked for the pc's. dhcp, dns, etc. If I make the bridge a proxyarp I have to make the pc's use a static ip address because broadcast protocols will not work through the proxyarp. All non-broadcast protocols work as expected.

In this case we are working with static ip addresses so if there are no other broadcast protocols needed then I think the proxyarp would be ok.

I still don't see, however why a bridge will not work using the isp's router as a gateway as long as you have the ip addresses to use.

I guess I can't see the difference in setting it up internally on my lan's subnet using my router, and using the same thing on the isp's subnet using their router.

dolvmin 11-15-2003 09:03 AM

Quote:

Originally posted by DavidPhillips

I still don't see, however why a bridge will not work using the isp's router as a gateway as long as you have the ip addresses to use.

Well, after you brought up the ARP protocal, I was thinking to myself prior to going to bed and recalled something important. I forgot Shaina said she already had IP's setup. I was so busy thinking the word router, I completely forgot Shaina does not need to have a new subnet to generate new IPs.

If Shaina only needs to foward the IP's to existing computers, then I strongly believe the ARP protocal is the way to go. A bridge "WOULD" work mainly because the first IP that would be asigned to the router is being asigned to the Ethernet of the bridge, allowing the existing IP's to pass through and bind to the MAC of each active Ethernet. The only addition needed is to send to required packets to the router of the ISP. That is where the ARP Protocal would come into effect. I think you have a solid point here. Wow man, you surpised me. I don't get that often. This is some awsome stuff, lol.


All times are GMT -5. The time now is 06:19 AM.