NAS542, Link Aggregation and MAC address
I have a NAS542 and I've setup the Link Aggregation feature. I have also setup iSCI volume, which needs an IP address on the PC part of the setup.
I've setup the DHCP server on the router to give a specific IP to the NAS, but because the two LANs on the NAS have two MACs - numbers:B8 for the one and numbers:B9 for the other, I found out that when restarting the NAS, sometimes it shows to the router as ...B8 and other times as B9 and in one case the router assigns the IP I want, but in the other case it assigns a different/random IP. The router doesn't allow me to give one IP to two different MACs, so when the "wrong" LAN card shows first, I can't access the iSCSI.
Can this be resolved?
#NAS_Aug
Best Answers
-
Yes, it's enabled. WebDAV is the only service I enabled successfully through MyCloud:And HTTP didn't work. Are you sure port 80 is available? Can you manually forward it?Also after each restart the gateway is lost, so can I add the line in the script?In that case you are pretty close to using a fixed IP anyway, eh? Anyway, I can imagine that doesn't work. The DHCP client is started, but it is possible that it returns before the IP is known. Don't know what happens then with the already set gateway. Better filter the -G away:
#!/bin/sh<br>date >>/tmp/dhcpcd.log<br>echo "\$0 \$@" >>/tmp/dhcpcd.log<br>ARGS="\$( echo "\$@" | sed 's/-G//' )"<br># have a look:<br>echo \$ARGS >>/tmp/dhcpcd.log<br>ifconfig bond0 hw ether 00:11:22:33:44:55<br>exec /sbin/dhcpcd.old \$ARGS<br>__EOF__
cat >/sbin/dhcpcd <<__EOF__<br>
0 -
Isn't that my case?Semi-fixed IP? Yes.Would there be a conflict?
No. The DHCP server won't hand it over to any other device, as it's reserved for the NAS. The NAS will never ask for it, but just use it. That's fine.
A downside of this approach can be that the nas is not accessible by hostname. Many routers will automatically add the hostnames of the DHCP clients to the DNS system. So in your case that entry might not be there. (Or maybe it does, if fixed IP assignments are also added).
0
All Replies
-
Hi,
Did you configure your link aggregation as port trunk in NAS itself?
If no, then you can refer the user manual on charpter 8.4.2, ftp://ftp2.zyxel.com/NAS326/user_guide/NAS326_V5.21 ed2.pdf
And after configured, you will see the below screen:
After bind, it would have only 1 MAC address, and you don't need to configure link aggregation on router or switch.
0 -
Hi,
That's exactly how I've configured it. But after restart, sometimes it sends LAN1 MAC, sometimes LAN2.
But I've also configured the router's Link Aggregation:
If I disable the router's Link Aggregation would it work properly?0 -
NAS has bind its 2 ethernet ports as used one MAC address, so I think you may be able to disable link aggregation on your router, and you can try it.
0 -
OK, I tried that, disabled router's LA, restarted NAS and it changed the MAC.
Each restart switches the MAC!0 -
Anyone?0
-
The most straight forward solution is using a fixed IP.If that is no option, how are your command line skills? You problem is a very common problem. A quick google proves that. Unfortunately the solutions on internet (like this one) don't fit your box.Yet it is possible to change the mac address manually.Using some black magic it is possible to inject code at boot time. So you can rename /sbin/dhcpcd to /sbin/dhcpcd.old, and put a script in place which does:
<div>#!/bin/sh</div><div><br></div><div>ifconfig bond0 hw ether 00:11:22:33:44:55</div><div><br></div><div>exec /sbin/dhcpcd.old "$@"<br></div>
Unfortunately this has to be done @each boot, because /sbin/ is on a ramdrive. Fortunately the black magic covers that.
1 -
Thank you very much for your answer. This appears to be a little advanced for me, so I'll do some reading first, then I'll try it. I may still need some help.0
-
I may still need some help.
I'm here.
1 -
Hello again. A little late here, but I'd like to do what you suggested. I didn't know how to do the command line, so I read a little and I can do it now through Putty. So I can see now the directories with 'ls' command, I can go super user to rename the dhcpcd file.
What I don't understand is:
After renaming it, you said to put a script there. What is this, a text file with the same name and with your code inside?0 -
What I don't understand is:
After renaming it, you said to put a script there. What is this, a text file with the same name and with your code inside?Yes, basically. In Linux (and Unix) a file is executable when it has the executable flag set. When an executable file is a textfile, Linux reads the first line to see (after the #!) which script interpreter to use. In this case /bin/sh, which happens to be the same binary which supports the shell you are working in, and for that reason it's called a shell-script, and it can execute the same commands you can type in the shell.
So you can put that code in a file, set the executable flag (chmod a+x filename), and it should run fine.
The most occurring error on this is when the file doesn't have Linux line endings. A file created with Notepad won't work, because it has Windows line endings. In Windows for instance PsPad can create linux line endings. (Somewhere in the menu you have choice between Windows, Linux/Unix and Mac)
1
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 146 Nebula Ideas
- 96 Nebula Status and Incidents
- 5.7K Security
- 262 USG FLEX H Series
- 271 Security Ideas
- 1.4K Switch
- 74 Switch Ideas
- 1.1K Wireless
- 40 Wireless Ideas
- 6.4K Consumer Product
- 249 Service & License
- 387 News and Release
- 84 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.5K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 85 About Community
- 73 Security Highlight