LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-11-2003, 10:44 PM   #1
shania
Member
 
Registered: Oct 2003
Posts: 37

Rep: Reputation: 15
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 ?
 
Old 11-12-2003, 01:26 AM   #2
shania
Member
 
Registered: Oct 2003
Posts: 37

Original Poster
Rep: Reputation: 15
bugger no replies yet
 
Old 11-12-2003, 02:38 AM   #3
dolvmin
Member
 
Registered: Jul 2003
Location: Florida
Distribution: Red Hat 7.2/8/9, Fedora Core 1/2/3, Smoothwall, Mandrake 7.0/10, Vecter 4, Arch 0.6, EnGuarde
Posts: 289

Rep: Reputation: 30
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.
 
Old 11-12-2003, 03:39 AM   #4
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
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.
 
Old 11-12-2003, 07:33 PM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you could also go for a bridge setup

proxyarp

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


bridge

http://www.linuxquestions.org/questi...451#post188451
 
Old 11-14-2003, 03:36 PM   #6
dolvmin
Member
 
Registered: Jul 2003
Location: Florida
Distribution: Red Hat 7.2/8/9, Fedora Core 1/2/3, Smoothwall, Mandrake 7.0/10, Vecter 4, Arch 0.6, EnGuarde
Posts: 289

Rep: Reputation: 30
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.
 
Old 11-14-2003, 05:30 PM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
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.
 
Old 11-14-2003, 05:48 PM   #8
dolvmin
Member
 
Registered: Jul 2003
Location: Florida
Distribution: Red Hat 7.2/8/9, Fedora Core 1/2/3, Smoothwall, Mandrake 7.0/10, Vecter 4, Arch 0.6, EnGuarde
Posts: 289

Rep: Reputation: 30
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.
 
Old 11-14-2003, 07:07 PM   #9
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
The "bridge" will connect to the Internet on one interface and to a hub on the other, where the other systems are connected.
 
Old 11-14-2003, 08:03 PM   #10
dolvmin
Member
 
Registered: Jul 2003
Location: Florida
Distribution: Red Hat 7.2/8/9, Fedora Core 1/2/3, Smoothwall, Mandrake 7.0/10, Vecter 4, Arch 0.6, EnGuarde
Posts: 289

Rep: Reputation: 30
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.
 
Old 11-14-2003, 08:58 PM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
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.
 
Old 11-14-2003, 09:03 PM   #12
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
If this can't work for some reason then just revert back to my first link and use a proxyarp.
 
Old 11-15-2003, 03:39 AM   #13
dolvmin
Member
 
Registered: Jul 2003
Location: Florida
Distribution: Red Hat 7.2/8/9, Fedora Core 1/2/3, Smoothwall, Mandrake 7.0/10, Vecter 4, Arch 0.6, EnGuarde
Posts: 289

Rep: Reputation: 30
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.
 
Old 11-15-2003, 05:32 AM   #14
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
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.
 
Old 11-15-2003, 09:03 AM   #15
dolvmin
Member
 
Registered: Jul 2003
Location: Florida
Distribution: Red Hat 7.2/8/9, Fedora Core 1/2/3, Smoothwall, Mandrake 7.0/10, Vecter 4, Arch 0.6, EnGuarde
Posts: 289

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
static ip's with hub? heinola Linux - Networking 2 10-24-2005 09:17 PM
Static IP's with LAN/WAN nistur Linux - Networking 3 05-25-2005 05:01 PM
Routing with multiple static IP's? RedLance Linux - Networking 3 11-02-2003 04:37 AM
can i have both dhcp and static ip's ? mjenkins Linux - Networking 1 09-22-2003 09:29 AM
Static Ip's and Routing Sarcha Linux - Networking 5 02-28-2003 08:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration